private void OnGUI() { EditorGUILayout.BeginVertical(); { if (GUILayout.Button(new GUIContent("Open performance settings prefab", "Opens the prefab that defines global performance settings."), GUILayout.Width(globalSettingsButtonWidth))) { StateSynchronizationMenuItems.EditGlobalPerformanceParameters(); } if (!EditorApplication.isPlaying) { if (StateSynchronizationObserver.Instance == null) { RenderTitle("StateSynchronizationObserver was not detected in the current scene. Open the SpectatorViewPerformance scene.", Color.red); } else { RenderTitle("Enter playmode to view performance information.", Color.gray); } } else if (EditorApplication.isPlaying && !StateSynchronizationObserver.IsInitialized) { RenderTitle("StateSynchronizationObserver was not detected in the current scene. Open SpectatorViewCompositor", Color.red); } else { UpdatePerformanceInformation(); } } EditorGUILayout.EndVertical(); }
public void OnPreprocessBuild(BuildReport report) { if (StateSynchronizationMenuItems.EnablePreBuildSteps) { RunPreBuildSteps(); } if (StateSynchronizationMenuItems.EnableUpdatingAssetCaches) { StateSynchronizationMenuItems.UpdateAllAssetCaches(); } }