If you use both Category hierarchy and CallInEditor in UFUNCTION, it will result in an unintended sequence as shown below.
[Image Removed]
And, the following code can solve this issue
void FDetailLayoutBuilderImpl::GenerateDetailLayout() { ... SubCategoryMap.Empty(); for (FCategoryMap::TIterator It(DefaultCategoryMap); It; ++It) { // Remove all subcategories TSharedPtr<FDetailCategoryImpl> DetailCategory = It.Value(); // Note: Sub-categories are added later int32 Index = INDEX_NONE; if (DetailCategory->GetCategoryName().ToString().FindChar(FPropertyNodeConstants::CategoryDelimiterChar, Index)) { SubCategoryMap.Add(It.Key(), DetailCategory); It.RemoveCurrent(); } } #if 1 //workaround begins for (FCategoryMap::TIterator It(CustomCategoryMap); It; ++It) { // Remove all subcategories TSharedPtr<FDetailCategoryImpl> DetailCategory = It.Value(); // Note: Sub-categories are added later int32 Index = INDEX_NONE; if (DetailCategory->GetCategoryName().ToString().FindChar(FPropertyNodeConstants::CategoryDelimiterChar, Index)) { SubCategoryMap.Add(It.Key(), DetailCategory); It.RemoveCurrent(); } } #endif //workaround ends // Build default categories while (DefaultCategoryMap.Num() > 0) ...
1. Add function using subcategory
UFUNCTION(CallInEditor, Category = "Map|Capture")
void GenerateSnapshot();
2. compile
3. Check Detail panel of Actor
result : does not consider subcategory
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How does TArray loop correctly remove elements in blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-164419 in the post.
4 |
Component | UE - Gameplay - Blueprint Editor |
---|---|
Affects Versions | 5.0 |
Created | Sep 20, 2022 |
---|---|
Updated | Mar 26, 2023 |