public void OnGUI() { if (!Cfg || !Cfg.enablePainterUIonPlay) { return; } if (FocusedPainter) { OnGUIWindow.Render(FocusedPainter, "{0} {1}".F(FocusedPainter.name, FocusedPainter.GetMaterialTextureProperty())); foreach (var p in CameraModuleBase.GuiPlugins) { p.OnGUI(); } } if (!PlaytimePainter.IsCurrentTool) { OnGUIWindow.Collapse(); } }
public void CombinedUpdate() { if (!this || !Data) { return; } lastManagedUpdate = QcUnity.TimeSinceStartup(); if (PlaytimePainter.IsCurrentTool && FocusedPainter) { FocusedPainter.ManagedUpdateOnFocused(); } QcAsync.UpdateManagedCoroutines(); MeshManager.CombinedUpdate(); if (!Application.isPlaying && depthProjectorCamera) { depthProjectorCamera.ManagedUpdate(); } #if UNITY_EDITOR if (refocusOnThis) { _scipFrames--; if (_scipFrames == 0) { QcUnity.FocusOn(refocusOnThis); refocusOnThis = null; _scipFrames = 3; } } #endif var p = PlaytimePainter.currentlyPaintedObjectPainter; if (p && !Application.isPlaying && ((QcUnity.TimeSinceStartup() - lastPainterCall) > 0.016f)) { if (p.TexMeta == null) { PlaytimePainter.currentlyPaintedObjectPainter = null; } else { p.ProcessStrokeState(); } } var needRefresh = false; if (CameraModuleBase.modules != null) { foreach (var pl in CameraModuleBase.modules) { if (pl != null) { pl.Update(); } else { needRefresh = true; } } } if (needRefresh) { Debug.Log("Refreshing modules"); CameraModuleBase.RefreshModules(); } lastPainterCall = QcUnity.TimeSinceStartup(); }