public override void OnInspectorGUI() { serializedObject.Update(); if (GUILayout.Button("Switch language (English / 日本語)")) { CgeLocalization.CycleLocale(); } if (CgeLocalization.IsEnglishLocaleActive()) { EditorGUILayout.LabelField(""); } else { EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); } _foldoutHelp = EditorGUILayout.Foldout(_foldoutHelp, new GUIContent("Help", _guideIcon32)); if (_foldoutHelp) { if (GUILayout.Button(new GUIContent("Open documentation and tutorials", _guideIcon32))) { Application.OpenURL("https://hai-vr.github.io/combo-gesture-expressions-av3/"); } } EditorGUILayout.Separator(); EditorGUI.BeginDisabledGroup(serializedObject.isEditingMultipleObjects); if (GUILayout.Button(new GUIContent(CgeLocale.CGEE_Open_editor), GUILayout.Height(40))) { CgeWindowHandler.Obtain().ShowActivity((ComboGestureActivity)serializedObject.targetObject); } if (serializedObject.isEditingMultipleObjects) { EditorGUILayout.HelpBox("Editor window is not available in multi-editing.", MessageType.Info); } EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); if (!serializedObject.isEditingMultipleObjects) { editorLegacyFoldout.boolValue = EditorGUILayout.Foldout(editorLegacyFoldout.boolValue, "Legacy editor"); } else { GUILayout.Label("Legacy editor / Multi editing", EditorStyles.boldLabel); } if (serializedObject.isEditingMultipleObjects || editorLegacyFoldout.boolValue) { LegacyEditor(); } serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); if (mainTree.objectReferenceValue != null && mainTree.objectReferenceValue is AnimationClip) { mainTree.objectReferenceValue = null; } if (GUILayout.Button("Switch language (English / 日本語)")) { CgeLocalization.CycleLocale(); } if (CgeLocalization.IsEnglishLocaleActive()) { EditorGUILayout.LabelField(""); } else { EditorGUILayout.LabelField("一部の翻訳は正確ではありません。cge.jp.jsonを編集することができます。"); } EditorGUILayout.Separator(); EditorGUI.BeginDisabledGroup(serializedObject.isEditingMultipleObjects); if (GUILayout.Button(new GUIContent(CgeLocale.CGEE_Open_editor), GUILayout.Height(40))) { CgeWindowHandler.Obtain().ShowPuppet((ComboGesturePuppet)serializedObject.targetObject); } if (serializedObject.isEditingMultipleObjects) { EditorGUILayout.HelpBox("Editor window is not available in multi-editing.", MessageType.Info); } EditorGUI.EndDisabledGroup(); EditorGUILayout.Separator(); if (!serializedObject.isEditingMultipleObjects) { editorLegacyFoldout.boolValue = EditorGUILayout.Foldout(editorLegacyFoldout.boolValue, "Legacy editor"); } else { GUILayout.Label("Legacy editor / Multi editing", EditorStyles.boldLabel); } if (serializedObject.isEditingMultipleObjects || editorLegacyFoldout.boolValue) { LegacyEditor(); } serializedObject.ApplyModifiedProperties(); }