示例#1
0
        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);
        }
示例#2
0
 public static void CreateSpline()
 {
     ScriptableObjUtil.CreateAsset <Bezier>();
 }