public static void CreateScriptableObject() { List <Type> allScriptableObjects; try { var assemblies = GetAssemblies(); allScriptableObjects = new List <Type>(from assembly in assemblies from type in assembly.GetTypes() where type.IsSubclassOf(typeof(ScriptableObject)) select type); } catch (Exception e) { Debug.LogError("Error while opening scriptable object window: " + e.Message); allScriptableObjects = new List <Type>(); } ScriptableObjectWindow.Init(allScriptableObjects.ToArray()); }
public static void CreateScriptableObjectFactoryWindow(bool getAllAssemblies) { var allScriptableObjectTypes = new List <Type>(); var assemblies = getAllAssemblies ? GetAllAssemblies() : GetCSharpAssembly(); foreach (var assembly in assemblies) { try { allScriptableObjectTypes.AddRange(from type in assembly.GetTypes() where type.IsSubclassOf(typeof(ScriptableObject)) select type); } catch (Exception e) { Debug.LogError("Error while opening scriptable object window: " + "assembly=" + assembly.FullName + "\n" + e.Message); } } ScriptableObjectWindow.Init(allScriptableObjectTypes.ToArray(), getAllAssemblies); }
public static void CreateScriptableObjectFactoryWindow() { var assemblies = ReflectionHelper.GetAllAssemblies(); ScriptableObjectWindow.Init(assemblies); }