Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public static void CreateSpline()
 {
     ScriptableObjUtil.CreateAsset <Bezier>();
 }