static void CreateScriptableObject() { var selected = Selection.activeObject as MonoScript; if (selected == null || !AssetDatabase.Contains(selected)) { Debug.Log("Select ScriptableObject in Assets"); return; } var type = selected.GetClass(); if (!type.IsSubclassOf(typeof(ScriptableObject))) { Debug.Log("Not a Subclass of ScriptableObject"); return; } ScriptableObjUtil.CreateAssetNonGeneric(type); }
public static void CreateSpline() { ScriptableObjUtil.CreateAsset <Bezier>(); }