Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

AssetDatabase.FindAssets and namespaces

$
0
0
I'm using [AssetDatabase][1].[FindAssets][2], but it doesn't seem to be able to handle multiple levels of namespaces. Code I´m using to find [ScriptableObject][3]s (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? [1]: http://docs.unity3d.com/ScriptReference/AssetDatabase.html [2]: http://docs.unity3d.com/ScriptReference/AssetDatabase.FindAssets.html [3]: http://docs.unity3d.com/ScriptReference/ScriptableObject.html

Viewing all articles
Browse latest Browse all 398

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>