Exemple #1
0
        private static void OnTypeSelectedEvent(Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            string path = ScriptableObjectUtility.GetSelectionAssetPath();

            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            ScriptableObject asset = ScriptableObjectUtility.CreateAssetAtPath(type, path, "New " + type.Name);

            EditorUtility.FocusProjectWindow();
            EditorUtility.SetDirty(asset);
            Selection.activeObject = asset;

            window.Close();
            instance = null;
        }
Exemple #2
0
 private static void Open()
 {
     instance = new ScriptableObjectCreator();
     instance.OpenFilterWindow <ScriptableObject>();
 }