Ejemplo n.º 1
0
        void OnGUI()
        {
            GUILayout.Label("Filter namespace");
            filterNamespace = GUILayout.TextField(filterNamespace);
            if (GUILayout.Button("Filter"))
            {
                ResetScriptableClass();
            }

            GUILayout.Label("Type of ScriptableObject:");
            scriptableClassIndex = EditorGUILayout.Popup(scriptableClassIndex, scriptableClassNames);

            if (GUILayout.Button("Create ScriptableObject"))
            {
                var className = scriptableClassNames[scriptableClassIndex];
                var nameArray = className.Split(new char[] { '.' });
                if (nameArray.Length > 0)
                {
                    className = nameArray[nameArray.Length - 1];
                }
                else
                {
                    className = this.fileName;
                }
                ScriptableCreateUtility.CreateScriptableObject(scriptableClassTypes[scriptableClassIndex], rootPath, className, fileExtenstion);
            }
        }
Ejemplo n.º 2
0
 static public DefineSetting FetchDefineSetting()
 {
     return(ScriptableCreateUtility.GetScriptable <DefineSetting>(fileName));
 }
Ejemplo n.º 3
0
 static public void CreateDefineSetting()
 {
     ScriptableCreateUtility.GetOrCreateScriptable <DefineSetting>(fileName);
 }