// Copyright Epic Games, Inc. All Rights Reserved. #include "NiagaraSystemDetailsCustomization.h" #include "PropertyHandle.h" #include "DetailLayoutBuilder.h" #include "DetailCategoryBuilder.h" #include "NiagaraSystem.h" #include "Toolkits/NiagaraSystemToolkit.h" TSharedRef FNiagaraSystemDetails::MakeInstance() { return MakeShared(); } void FNiagaraSystemDetails::CustomizeDetails(IDetailLayoutBuilder& InDetailLayout) { // we display the scalability category within scalability mode, which is why we hide it here InDetailLayout.HideCategory("Scalability"); InDetailLayout.SortCategories( [](const TMap& CategoryMap) { for (const TPair& Pair : CategoryMap) { int32 SortOrder = Pair.Value->GetSortOrder(); const FName& CategoryName = Pair.Key; if (CategoryName == "System") { SortOrder = 1; } else if (CategoryName == "Rendering") { SortOrder = 2; } else if (CategoryName == "Debug") { SortOrder = 3; } else if (CategoryName == "Performance") { SortOrder = 4; } else { SortOrder += 5; } Pair.Value->SetSortOrder(SortOrder); } } ); }