For more complex AssetRegistrySearchable tags, E.g FGameplayTag GetTagValue()
will not work. Instead, try this:
FAssetDataTagMapSharedView::FFindTagResult TagValue = AssetData.TagsAndValues.FindTag( GET_MEMBER_NAME_CHECKD(YourUObjectClass, PropertyName) );
if ( TagValue.IsSet() )
{
/** Do your magic here. */
}
FYI @sp3cim4n uses the Asset Manager, which utilizes the Asset Registry. Let me just say the Asset Manager is very useful for checking certain information in an asset before it’s loaded, which saves on memory. I myself have a derived Asset Manager that adds in a lot more functionality than the base Asset Manager class provides.
For instance, the Asset Manager has trouble with Widget Blueprints and their Primary Asset Types base class in packaged builds. This is because packaging strips away everything editor related and you are left with a UWigetBlueprintGeneratedClass
, instead of a BaseClassSelectedInAssetManagerSettings
. I have a work around that I posted on the forums Here.