void DebugSettingsGUI() { m_ShowDebugSettings.value = EditorGUILayout.FoldoutTitlebar(m_ShowDebugSettings.value, Styles.DebugSettings, true); if (m_ShowDebugSettings.value) { EditorGUI.indentLevel++; m_ShowProbeDebugSettings.value = EditorGUILayout.Foldout(m_ShowProbeDebugSettings.value, Styles.LightProbeVisualization, true); if (m_ShowProbeDebugSettings.value) { EditorGUI.BeginChangeCheck(); EditorGUI.indentLevel++; LightProbeVisualization.lightProbeVisualizationMode = (LightProbeVisualization.LightProbeVisualizationMode)EditorGUILayout.EnumPopup(LightProbeVisualization.lightProbeVisualizationMode); LightProbeVisualization.showInterpolationWeights = EditorGUILayout.Toggle(Styles.DisplayWeights, LightProbeVisualization.showInterpolationWeights); LightProbeVisualization.showOcclusions = EditorGUILayout.Toggle(Styles.DisplayOcclusion, LightProbeVisualization.showOcclusions); LightProbeVisualization.highlightInvalidCells = EditorGUILayout.Toggle(Styles.HighlightInvalidCells, LightProbeVisualization.highlightInvalidCells); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { EditorApplication.SetSceneRepaintDirty(); } } m_BakeSettings.DeveloperBuildSettingsGUI(); EditorGUI.indentLevel--; EditorGUILayout.Space(); } }
private void DebugSettingsGUI() { this.m_ShowDebugSettings = EditorGUILayout.FoldoutTitlebar(this.m_ShowDebugSettings, LightingWindowLightingTab.Styles.DebugSettings, true); if (this.m_ShowDebugSettings) { EditorGUI.indentLevel++; this.m_ShowProbeDebugSettings = EditorGUILayout.Foldout(this.m_ShowProbeDebugSettings, LightingWindowLightingTab.Styles.LightProbeVisualization); if (this.m_ShowProbeDebugSettings) { EditorGUI.BeginChangeCheck(); EditorGUI.indentLevel++; LightProbeVisualization.lightProbeVisualizationMode = (LightProbeVisualization.LightProbeVisualizationMode)EditorGUILayout.EnumPopup(LightProbeVisualization.lightProbeVisualizationMode, new GUILayoutOption[0]); LightProbeVisualization.showInterpolationWeights = EditorGUILayout.Toggle("Display Weights", LightProbeVisualization.showInterpolationWeights, new GUILayoutOption[0]); LightProbeVisualization.showOcclusions = EditorGUILayout.Toggle("Display Occlusion", LightProbeVisualization.showOcclusions, new GUILayoutOption[0]); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { EditorApplication.SetSceneRepaintDirty(); } } EditorGUILayout.Space(); this.m_BakeSettings.DeveloperBuildSettingsGUI(); EditorGUI.indentLevel--; EditorGUILayout.Space(); } }
private static void DisableFrameDebugger() { if (FrameDebuggerUtility.IsLocalEnabled()) { EditorApplication.SetSceneRepaintDirty(); } FrameDebuggerUtility.SetEnabled(false, FrameDebuggerUtility.GetRemotePlayerGUID()); }
private static void DisableFrameDebugger() { if (FrameDebuggerUtility.enabled) { EditorApplication.SetSceneRepaintDirty(); } FrameDebuggerUtility.enabled = false; }
private static void DisableFrameDebugger() { // if it was true before, we disabled and ask the game scene to repaint if (FrameDebugger.IsLocalEnabled()) { EditorApplication.SetSceneRepaintDirty(); } FrameDebuggerUtility.SetEnabled(false, FrameDebuggerUtility.GetRemotePlayerGUID()); }
internal void RepaintAllNeededThings() { // indicate that editor needs a redraw (mostly to get offscreen cameras rendered) EditorApplication.SetSceneRepaintDirty(); // Note: do NOT add GameView.RepaintAll here; that would cause really confusing // behaviors when there are offscreen (rendering into RTs) cameras. // redraw ourselves Repaint(); }
public override void OnPreviewSettings() { if (this.ValidPreviewSetup()) { this.m_CubemapEditor.mipLevel = this.m_MipLevelPreview; EditorGUI.BeginChangeCheck(); this.m_CubemapEditor.OnPreviewSettings(); if (EditorGUI.EndChangeCheck()) { EditorApplication.SetSceneRepaintDirty(); this.m_MipLevelPreview = this.m_CubemapEditor.mipLevel; } } }
private void UpdateZoomAreaAndParent() { bool flag = Mathf.Approximately(this.m_ZoomArea.scale.y, this.m_defaultScale); this.ConfigureZoomArea(); this.m_defaultScale = this.DefaultScaleForTargetInView(this.targetSize, this.viewInWindow.size); if (flag) { this.m_ZoomArea.SetTransform(Vector2.zero, Vector2.one * this.m_defaultScale); this.EnforceZoomAreaConstraints(); } this.CopyDimensionsToParentView(); this.m_LastWindowPixelSize = base.position.size * EditorGUIUtility.pixelsPerPoint; EditorApplication.SetSceneRepaintDirty(); }
private void UpdateZoomAreaAndParent() { // Configure ZoomableArea for new resolution so that old resolution doesn't restrict scale bool oldScaleWasDefault = Mathf.Approximately(m_ZoomArea.scale.y, m_defaultScale); ConfigureZoomArea(); m_defaultScale = DefaultScaleForTargetInView(targetSize, viewInWindow.size); if (oldScaleWasDefault) { m_ZoomArea.SetTransform(Vector2.zero, Vector2.one * m_defaultScale); EnforceZoomAreaConstraints(); } CopyDimensionsToParentView(); m_LastWindowPixelSize = position.size * EditorGUIUtility.pixelsPerPoint; EditorApplication.SetSceneRepaintDirty(); }
public override void OnPreviewSettings() { if (!ValidPreviewSetup()) { return; } m_CubemapEditor.mipLevel = m_MipLevelPreview; EditorGUI.BeginChangeCheck(); m_CubemapEditor.OnPreviewSettings(); // Need to repaint, because mipmap value changes affect reflection probe preview in the scene if (EditorGUI.EndChangeCheck()) { EditorApplication.SetSceneRepaintDirty(); m_MipLevelPreview = m_CubemapEditor.mipLevel; } }
private void GameViewAspectWasChanged() { base.SetInternalGameViewRect(GameView.GetConstrainedGameViewRenderRect(this.gameViewRenderRect, this.selectedSizeIndex)); EditorApplication.SetSceneRepaintDirty(); }
internal static void RefreshPrototypes() { GetActiveTerrainData().RefreshPrototypes(); GetActiveTerrain().Flush(); EditorApplication.SetSceneRepaintDirty(); }
void WorkflowSettingsGUI() { m_ShowWorkflowSettings.value = EditorGUILayout.FoldoutTitlebar(m_ShowWorkflowSettings.value, Styles.workflowSettings, true); if (m_ShowWorkflowSettings.value) { EditorGUI.indentLevel++; // GPU lightmapper device selection. if (Lightmapping.GetLightingSettingsOrDefaultsFallback().lightmapper == LightingSettings.Lightmapper.ProgressiveGPU) { DeviceAndPlatform[] devicesAndPlatforms = Lightmapping.GetLightmappingGpuDevices(); if (devicesAndPlatforms.Length > 0) { int[] lightmappingDeviceIndices = Enumerable.Range(0, devicesAndPlatforms.Length).ToArray(); GUIContent[] lightmappingDeviceStrings = devicesAndPlatforms.Select(x => new GUIContent(x.name)).ToArray(); int bakingDeviceAndPlatform = -1; string configDeviceAndPlatform = EditorUserSettings.GetConfigValue(m_LightmappingDeviceIndex); if (configDeviceAndPlatform != null) { bakingDeviceAndPlatform = Int32.Parse(configDeviceAndPlatform); bakingDeviceAndPlatform = Mathf.Clamp(bakingDeviceAndPlatform, 0, devicesAndPlatforms.Length - 1); // Removing a GPU and rebooting invalidates the saved value. } else { bakingDeviceAndPlatform = Lightmapping.GetLightmapBakeGPUDeviceIndex(); } Debug.Assert(bakingDeviceAndPlatform != -1); EditorGUI.BeginChangeCheck(); using (new EditorGUI.DisabledScope(devicesAndPlatforms.Length < 2)) { bakingDeviceAndPlatform = EditorGUILayout.IntPopup(Styles.progressiveGPUBakingDevice, bakingDeviceAndPlatform, lightmappingDeviceStrings, lightmappingDeviceIndices); } if (EditorGUI.EndChangeCheck()) { if (EditorUtility.DisplayDialog("Warning", Styles.progressiveGPUChangeWarning.text, "OK", "Cancel")) { EditorUserSettings.SetConfigValue(m_LightmappingDeviceIndex, bakingDeviceAndPlatform.ToString()); DeviceAndPlatform selectedDeviceAndPlatform = devicesAndPlatforms[bakingDeviceAndPlatform]; EditorApplication.CloseAndRelaunch(new string[] { "-OpenCL-PlatformAndDeviceIndices", selectedDeviceAndPlatform.platformId.ToString(), selectedDeviceAndPlatform.deviceId.ToString() }); } } } else { // To show when we are still fetching info, so that the UI doesn't pop around too much for no reason using (new EditorGUI.DisabledScope(true)) { EditorGUILayout.IntPopup(Styles.progressiveGPUBakingDevice, 0, Styles.progressiveGPUUnknownDeviceStrings, Styles.progressiveGPUUnknownDeviceValues); } EditorGUILayout.HelpBox(Styles.progressiveGPUUnknownDeviceInfo.text, MessageType.Info); } } m_ShowProbeDebugSettings.value = EditorGUILayout.Foldout(m_ShowProbeDebugSettings.value, Styles.lightProbeVisualization, true); if (m_ShowProbeDebugSettings.value) { EditorGUI.BeginChangeCheck(); EditorGUI.indentLevel++; LightProbeVisualization.lightProbeVisualizationMode = (LightProbeVisualization.LightProbeVisualizationMode)EditorGUILayout.EnumPopup(LightProbeVisualization.lightProbeVisualizationMode); LightProbeVisualization.showInterpolationWeights = EditorGUILayout.Toggle(Styles.displayWeights, LightProbeVisualization.showInterpolationWeights); LightProbeVisualization.showOcclusions = EditorGUILayout.Toggle(Styles.displayOcclusion, LightProbeVisualization.showOcclusions); LightProbeVisualization.highlightInvalidCells = EditorGUILayout.Toggle(Styles.highlightInvalidCells, LightProbeVisualization.highlightInvalidCells); EditorGUI.indentLevel--; if (EditorGUI.EndChangeCheck()) { EditorApplication.SetSceneRepaintDirty(); } } if (Unsupported.IsDeveloperMode()) { Lightmapping.concurrentJobsType = (Lightmapping.ConcurrentJobsType)EditorGUILayout.IntPopup(Styles.concurrentJobs, (int)Lightmapping.concurrentJobsType, Styles.concurrentJobsTypeStrings, Styles.concurrentJobsTypeValues); if (GUILayout.Button("Clear disk cache", GUILayout.Width(Styles.buttonWidth))) { Lightmapping.Clear(); Lightmapping.ClearDiskCache(); } if (GUILayout.Button("Print state to console", GUILayout.Width(Styles.buttonWidth))) { Lightmapping.PrintStateToConsole(); } if (GUILayout.Button("Reset albedo/emissive", GUILayout.Width(Styles.buttonWidth))) { GIDebugVisualisation.ResetRuntimeInputTextures(); } if (GUILayout.Button("Reset environment", GUILayout.Width(Styles.buttonWidth))) { DynamicGI.UpdateEnvironment(); } } EditorGUI.indentLevel--; EditorGUILayout.Space(); } }
private void RepaintAllNeededThings() { EditorApplication.SetSceneRepaintDirty(); base.Repaint(); }
public static void QueuePlayerLoopUpdate() { EditorApplication.SetSceneRepaintDirty(); }