Пример #1
0
        private Data.FlowWindow CreateWindow_INTERNAL(Data.FlowWindow.Flags flags)
        {
            var newId = this.AllocateId();

            //var window = new Data.FlowWindow(newId, flags);
            //this.windows.Add(window);

            var window = Data.FlowWindow.CreateInstance <Data.FlowWindow>();

                        #if UNITY_EDITOR
            window.name = window.ToString();
            UnityEditor.AssetDatabase.AddObjectToAsset(window, this);
                        #endif
            window.Setup(newId, flags);

            this.windowAssets.Add(window);
            this.windowsCache.Clear();
            this.isDirty = true;

            this.Save();

                        #if UNITY_EDITOR
            UnityEditor.AssetDatabase.ImportAsset(UnityEditor.AssetDatabase.GetAssetPath(window), UnityEditor.ImportAssetOptions.ForceUpdate);
            UnityEditor.AssetDatabase.SaveAssets();
            UnityEditor.EditorUtility.SetDirty(window);
                        #endif

            return(window);
        }
Пример #2
0
 public Data.FlowWindow CreateWindow(Data.FlowWindow.Flags flags)
 {
     return(this.CreateWindow_INTERNAL(flags));
 }
Пример #3
0
 public static Data.FlowWindow CreateWindow(Data.FlowWindow.Flags flags)
 {
     return(FlowSystem.instance.data.CreateWindow(flags));
 }