Example #1
0
 void ToggleRealtime(bool state)
 {
     if (state)
     {
         HideButton(Styles.processButtonText);
         MixtureUpdater.AddGraphToProcess(graphView);
     }
     else
     {
         ShowButton(Styles.processButtonText);
         MixtureUpdater.RemoveGraphToProcess(graphView);
     }
     graph.realtimePreview = state;
 }
Example #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));
        }
 protected override void OnDestroy()
 {
     view?.Dispose();
     MixtureUpdater.RemoveGraphToProcess(view);
 }
 protected new void OnEnable()
 {
     base.OnEnable();
     graphUnloaded += g => MixtureUpdater.RemoveGraphToProcess(g as MixtureGraph);
 }
Example #5
0
 protected override void OnDestroy()
 {
     MixtureUpdater.RemoveGraphToProcess(view as MixtureGraphView);
 }