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