private ConstellationEditorData Setup()
        {
            var path = "Assets/Constellation/Editor/EditorData/EditorData.asset";

            EditorData = ScriptableObject.CreateInstance <ConstellationEditorData> ();
            AssetDatabase.CreateAsset(EditorData, path);
            return(EditorData);
        }
Пример #2
0
        private ConstellationEditorData Setup()
        {
            var path = ConstellationEditor.GetEditorPath() + "EditorData/EditorData.asset";

            AssetDatabase.DeleteAsset(path);
            AssetDatabase.Refresh();
            EditorData = ScriptableObject.CreateInstance <ConstellationEditorData> ();
            AssetDatabase.CreateAsset(EditorData, path);
            return(EditorData);
        }
        public ConstellationEditorData OpenEditorData()
        {
            var path = "Assets/Constellation/Editor/EditorData/EditorData.asset";
            ConstellationEditorData t = (ConstellationEditorData)AssetDatabase.LoadAssetAtPath(path, typeof(ConstellationEditorData));

            if (t == null)
            {
                return(Setup());
            }

            EditorData = t;
            return(EditorData);
        }
        private ConstellationEditorData Setup()
        {
            var path         = ConstellationEditor.GetEditorPath() + "EditorData.asset";
            var assemblyPath = ConstellationEditor.GetProjectPath() + "ConstellationAssembly.asset";

            AssetDatabase.DeleteAsset(assemblyPath);
            AssetDatabase.DeleteAsset(path);
            AssetDatabase.Refresh();
            EditorData = ScriptableObject.CreateInstance <ConstellationEditorData>();
            AssetDatabase.CreateAsset(EditorData, path);
            EditorData.ScriptAssembly = ScriptableObject.CreateInstance <ConstellationScriptsAssembly>();
            AssetDatabase.CreateAsset(EditorData.ScriptAssembly, assemblyPath);
            return(EditorData);
        }
Пример #5
0
        public ConstellationEditorData OpenEditorData()
        {
            var path = ConstellationEditor.GetEditorPath() + "EditorData/EditorData.asset";
            ConstellationEditorData t = (ConstellationEditorData)AssetDatabase.LoadAssetAtPath(path, typeof(ConstellationEditorData));

            if (t == null)
            {
                return(Setup());
            }

            EditorData = t;
            if (EditorData.LastOpenedConstellationPath == null)
            {
                EditorData.LastOpenedConstellationPath = new List <string> ();
            }
            return(EditorData);
        }