How to use AssetReferenceGameObject type?

alexlange

New member
Hi, I want to use AssetReferenceGameObject from Addressables in my custom task, but the inspector throws MissingMethodException: Default constructor not found for type UnityEngine.AddressableAssets.AssetReferenceGameObject. Does Behavior Designer support it?
 
I haven't used that specific field type before but one way to get around the default constructor error is to subclass that type and provide a default constructor.
 
Thanks. After some Google, it turns out that the type needs a GUID string. Unity did lots of work behind its AssetReferenceDrawer.cs, so people can have a nice GUI to select the addressable asset and convert it to the correct GUID. I guess there's no easy way to do this from the custom inspector since other assets like PlayMaker also suffer from showing addressable types.
 
Top