Hi All,
I have the following code to load an asset:
string[] _assetGUIDs = AssetDatabase.FindAssets("myAsset", new[] {"Assets/Editor/Data/Settings/" });
string _path = AssetDatabase.GUIDToAssetPath(_assetGUIDs[0]);
ScriptableObject _data = AssetDatabase.LoadAssetAtPath<ScriptableObject>(_path);
While the AssetDatabase.FindAssets query does return a assetGUID and the GUIDToAssetPath does return a path to a valid .asset file, the AssetDatabase.LoadAssetAtPath returns null.
This code used to work but after some reorganizing of folders in Unity (and ofcourse changing the path for the FindAssets method accordingly) the LoadAssetAtPath stopped returning a ScriptableObject.
Anyone an idea where to look for a solution? Project settings, Assembly references?
Thanks!