I’m using AssetDatabase.FindAssets, but it doesn’t seem to be able to handle multiple levels of namespaces.
Code I´m using to find ScriptableObjects (using System.Linq):
objects = (from t in AssetDatabase.FindAssets("t:ScriptableObject")
select (ScriptableObject)AssetDatabase.LoadAssetAtPath(
AssetDatabase.GUIDToAssetPath(t), typeof(ScriptableObject)) ).ToArray();
This object is found:
using UnityEngine;
namespace TestNamespace {
public class NamespaceTestScriptableObject : ScriptableObject {
public int property = 42;
}
}
But this is not found:
using UnityEngine;
namespace TestNamespace.Namespace2 {
public class NamespaceTestScriptableObject2 : ScriptableObject {
public string property = "Answer";
}
}
Is there any way around it?