private static string GetName(ScritableFound <PackagePullPushObject> pullPush) { if (pullPush == null) { return("A"); } if (pullPush.m_linked == null) { return("B"); } if (pullPush.m_linked.m_data == null) { return("C"); } return(pullPush.m_path); }
public static List <ScritableFound <T> > GetAllInstancesWithInfo <T>() where T : ScriptableObject { string[] guids = AssetDatabase.FindAssets("" + typeof(T).Name); //FindAssets uses tags check documentation for more info T[] a = new T[guids.Length]; List <ScritableFound <T> > list = new List <ScritableFound <T> >(); for (int i = 0; i < guids.Length; i++) { string path = AssetDatabase.GUIDToAssetPath(guids[i]); a[i] = AssetDatabase.LoadAssetAtPath <T>(path); ScritableFound <T> result = new ScritableFound <T>(); result.m_linked = a[i]; result.m_path = path; list.Add(result); } return(list); }