void OnGUI() { if (EditorApplication.isCompiling) { Reset(); } m_WindowWidth = (int)position.width; HandleEditorEvents(); InitStyle(); // Init manager serializer m_SerializedConfig = new SerializedObject(m_ConfigAsset); m_SerializedConfig.Update(); // Draw GUI EditorGUI.BeginChangeCheck(); DrawToolBarGUI(); if (EditorGUI.EndChangeCheck()) { ResolutionWindowBase.RepaintWindows(); } DrawPreviewGUI(); // APply properties m_SerializedConfig.ApplyModifiedProperties(); }
void OnGUI() { InitAllGameviewSizes(); serializedObject.Update(); EditorGUI.BeginChangeCheck(); EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); if (GUILayout.Button("Gallery Preview", EditorStyles.toolbarButton)) { ResolutionGalleryWindow.Init(); } if (GUILayout.Button("Device Preview", EditorStyles.toolbarButton)) { ResolutionPreviewWindow.Init(); } GUILayout.FlexibleSpace(); if (GUILayout.Button("About", EditorStyles.toolbarButton)) { UniversalDevicePreview.About(); } EditorGUILayout.EndHorizontal(); m_ScrollPos = EditorGUILayout.BeginScrollView(m_ScrollPos); EditorGUILayout.Separator(); DrawConfig(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); DrawSupportGUI(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); DrawContactGUI(); EditorGUILayout.EndScrollView(); if (EditorGUI.EndChangeCheck()) { ResolutionWindowBase.RepaintWindows(); } serializedObject.ApplyModifiedProperties(); }
void OnGUI() { InitAllGameviewSizes(); serializedObject.Update(); EditorGUI.BeginChangeCheck(); m_ScrollPos = EditorGUILayout.BeginScrollView(m_ScrollPos); EditorGUILayout.Separator(); EditorGUILayout.BeginVertical(GUI.skin.box); DrawGallery(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); DrawConfig(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); DrawSupportGUI(); EditorGUILayout.Separator(); EditorGUILayout.Separator(); DrawContactGUI(); EditorGUILayout.EndScrollView(); if (EditorGUI.EndChangeCheck()) { ResolutionWindowBase.RepaintWindows(); } serializedObject.ApplyModifiedProperties(); }