When creating an Editor Utility Blueprint derived from "Asset Action Utility", UE allows the user to override function "IsActionForBlueprints". When it returns true, the "Supported Classes" setting in the "Class Defaults" tab can be used to select a specific blueprint class such as "Actor" or "BP_MyActor" instead of the generic "Blueprint" class. This special behavior for blueprints was first available in UE 4.24 and worked (partially) up to UE 5.1, but has been broken since UE 5.2. From that version until today, the "Supported Classes" setting only works for native blueprintable classes like "Actor" or "ActorComponent", but not for any blueprint classes created inside the Editor. In that case, the "Scripted Asset Actions" context menu does not appear for any asset.
The problem is likely caused by an incorrect logic inside the "ProcessAssetAction" lambda defined within method FBlutilityContentBrowserExtensions_Impl::OnExtendContentBrowserAssetSelectionMenu(), in file [Engine\Source\Editor\Blutility\Private\BlutilityContentBrowserExtensions.cpp]. After checking flag "bIsActionForBlueprints" and getting the selected asset's class, its parent class is queried with UBlueprint::GetBlueprintParentClassFromAssetTags(), which returns the value of tag "NativeParentClass". The correct parent class would probably be the one stored in "Asset->ParentClass", without the need for any tag queries, as was done up to UE 5.1.
As a side note, from UE 4.24 to UE 5.1, the behavior was probably not completely correct either. If we had a hierarchy "Actor <-- BP_Parent <-- BP_Child" and set/added "BP_Parent" to the "Supported Classes" setting, the scripted asset action would only work for children of "BP_Parent", but not for "BP_Parent" itself.
1 - Create a new blueprint "BP_Parent" derived from "Actor"
2 - Create a new blueprint "BP_Other" derived from "Actor"
3 - Create a new blueprint "BP_Child" derived from "BP_Parent"
4 - Create an Editor Utility Blueprint derived from "Asset Action Utility"
4.1 - In "Class Defaults", add "BP_Parent" to the array "Supported Classes"
4.2 - Override function "IsActionForBlueprints" to always return true
4.3 - Create a new function "PrintSomething" which just calls the "PrintString" node with the default string.
4.4 - Make sure that the "PrintSomething" function is Public and that Call in Editor is true.
5 - Back in the Content Browser, right-click each asset one at a time: "BP_Parent", "BP_Child", "BP_Other"
5.1 - Look for the option "Scripted Asset Actions – Print Something"
5.2 - The scripted action will not appear for any asset, while it should appear for "BP_Parent" and "BP_Child" (but not for "BP_Other")
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-221973 in the post.
1 |
Component | UE - Editor - Workflow Systems |
---|---|
Affects Versions | 5.4.3, 5.2, 5.3 |
Target Fix | 5.6 |
Created | Aug 16, 2024 |
---|---|
Updated | Oct 10, 2024 |