Created
January 24, 2024 17:11
-
-
Save timoxley/9557f285cb64b48eed9f4048dcf3f308 to your computer and use it in GitHub Desktop.
Auto-generate custom sections for your game + use emoji in custom section name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const FName PropertyEditor("PropertyEditor"); | |
void FMyGameEditorModule::InitCategories() | |
{ | |
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(PropertyEditor); | |
for (const auto* const Class : TObjectRange<UClass>()) | |
{ | |
if (!Class->GetClassPathName().ToString().StartsWith("/Script/MyGame")) { continue; } | |
const TSharedRef<FPropertySection> Section = PropertyModule.FindOrCreateSection( | |
Class->GetFName(), | |
TEXT("MyGame"), | |
LOCTEXT("MyGame", "💛 My Game") | |
); | |
Section->AddCategory(TEXT("Default")); | |
Section->AddCategory(Class->GetFName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment