Exemplo n.º 1
0
 private void AutoAttachToSelection()
 {
     if ((Selection.activeObject as GameObject)?.GetComponent <VisualEffect>() is VisualEffect visualEffect)
     {
         foreach (var window in VFXViewWindow.GetAllWindows())
         {
             window.AttachTo(visualEffect);
         }
     }
 }
Exemplo n.º 2
0
 public static void RefreshVfxErrorsIfNeeded(ref bool needRefreshVfxErrors)
 {
     if (needRefreshVfxErrors)
     {
         foreach (var vfxWindow in VFXViewWindow.GetAllWindows())
         {
             if (vfxWindow != null)
             {
                 var vfxGraph = vfxWindow.graphView.controller.graph;
                 foreach (var output in vfxGraph.children.OfType <VFXDecalHDRPOutput>())
                 {
                     output.RefreshErrors(vfxGraph);
                 }
             }
         }
     }
     needRefreshVfxErrors = false;
 }
Exemplo n.º 3
0
 private void DetachIfDeleted()
 {
     VFXViewWindow.GetAllWindows().ToList().ForEach(x => x.DetachIfDeleted());
 }