Hey guys,
So I have an custom asset which has a Texture2D as a sub-asset which is assigned to a material used by objects on a scene.
On that scene I need go through each one of the loaded custom assets, and was doing this snippet below to get them:
MyCustomAsset[] myCustomAssets = Resources.FindObjectsOfTypeAll<MyCustomAsset>();
The problem is that, the returned array is always empty when running from a build.
The sub-assets are indeed loaded but the main asset itself is not. Is there a way to force the main asset to be loaded as well without requiring a direct reference?