What type of class are you adding this property to (Actor, Character, Pawn, etc)? Also, what class is MyAssetClass based off of? Are you making a blueprint of the MyAssetClass? Please list the steps that reproduce this issue.
After compiling I created a blueprint of MyActor and was able to add a variable of MyStruct. After compiling the blueprint I could select the My Struct Asset drop down which showed all available actors/classes.
Can you elaborate on your setup or what I’m doing differently.
So you have a C++ class ‘AMyActor’ with a Struct property of type FMyStruct.
You created a BP from AMyActory called MyBP.
In MyBP, you can see the MyStruct variable and open up the picker. That’s great.
As “MyAssetClass” is not existing, the pciker show you all the classes and didn’t filter anything (strange but that seems to be the default behavior).
Now we want to filter out the picker, so you should set properly the AllowedClasses meta property to filter a subset of the classes. By example, try to filter AMyActor. You should have 1 result, your newly created BP.
In my case, I wasn’t able to get the proper result when setting the AllowedClasses to a existing classes, the picker was empty.
After further testing I found that the drop down list is populated based on what is in the level. Each instance of the blueprint that is added to the level will appear in the list. This includes other blueprints based on MyActor once an instance exists in the level.
Thanks for the time spent on this case to finally understand how the meta property works.
My question now is more, is this by design? It’s very limited is term of use to only filter asset instance.
or does AllowAbstract or anoter property allow for us to not only have instance in the pickup?
the goal is to have something like “TSubClassOf” for StringAssetReference.
So, for clarification, you want to be able to select the drop down and have it only show things that are of type StringAssetReference or derived from StringAssetReference, is that correct?
This will not work since the drop down list will be populated for UObjects however a Struct is not a UObject thus won’t appear in the list.
No, I just want to see all BP of Type AMyActor, and only the one that are instanced in the level. I mean if I create a BP based on AMyActor in the content browser, I want to be able to see it in the pickup list.
When you have a variable of TSubClassOf, the pickup is properly filled, I want the same but with StringAssetReference and the metadata “AllowedClasses”.
I’m just trying to make sure I enter the correct feature request for what you’re asking. So you want StringAssetReference and TSubClassOf to work in tandem, such that the dropdown list only shows the actors of a specified type (as per TSubClassOf) and only shows actors placed in the level (does not show content browser assets)? If I’m still misunderstanding, please provide an example of what you’re trying to accomplish.