Пример #1
0
 void ToggleRealtime(bool state)
 {
     if (state)
     {
         HideButton(Styles.processButtonText);
         MixtureUpdater.AddGraphToProcess(graphView);
     }
     else
     {
         ShowButton(Styles.processButtonText);
         MixtureUpdater.RemoveGraphToProcess(graphView);
     }
     graph.realtimePreview = state;
 }
Пример #2
0
        protected override void InitializeWindow(BaseGraph graph)
        {
            if (view != null)
            {
                view.Dispose();
                MixtureUpdater.RemoveGraphToProcess(view);
            }

            var  mixture  = (graph as MixtureGraph);
            bool realtime = mixture.type == MixtureGraphType.Realtime;
            var  fileName = Path.GetFileNameWithoutExtension(mixture.mainAssetPath);

            titleContent = new GUIContent($"Mixture {(realtime ? "(RT) " : "")}- {fileName}", MixtureUtils.windowIcon);

            view = new MixtureGraphView(this);

            rootView.Add(view);

            view.Add(new MixtureToolbar(view));
        }
Пример #3
0
 protected override void OnDestroy()
 {
     view?.Dispose();
     MixtureUpdater.RemoveGraphToProcess(view);
 }
Пример #4
0
 protected new void OnEnable()
 {
     base.OnEnable();
     graphUnloaded += g => MixtureUpdater.RemoveGraphToProcess(g as MixtureGraph);
 }
Пример #5
0
 protected override void OnDestroy()
 {
     MixtureUpdater.RemoveGraphToProcess(view as MixtureGraphView);
 }