File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Assets/MRTK/Core/Inspectors/Setup Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ using Microsoft . MixedReality . Toolkit . Utilities . Editor ;
5
+ using System ;
6
+ using UnityEditor ;
7
+ using UnityEngine ;
8
+
9
+ namespace Microsoft . MixedReality . Toolkit . Editor
10
+ {
11
+ internal class MRTKVersionPopup : EditorWindow
12
+ {
13
+ private static MRTKVersionPopup window ;
14
+ private static readonly Version MRTKVersion = typeof ( MixedRealityToolkit ) . Assembly . GetName ( ) . Version ;
15
+ private static readonly Vector2 WindowSize = new Vector2 ( 300 , 150 ) ;
16
+ private static readonly GUIContent Title = new GUIContent ( "Mixed Reality Toolkit" ) ;
17
+
18
+ [ MenuItem ( "Mixed Reality/Toolkit/Show version..." ) ]
19
+ private static void Init ( )
20
+ {
21
+ if ( window != null )
22
+ {
23
+ window . Close ( ) ;
24
+ }
25
+
26
+ window = CreateInstance < MRTKVersionPopup > ( ) ;
27
+ window . titleContent = Title ;
28
+ window . maxSize = WindowSize ;
29
+ window . minSize = WindowSize ;
30
+ window . ShowUtility ( ) ;
31
+ }
32
+
33
+ private void OnGUI ( )
34
+ {
35
+ using ( new EditorGUILayout . VerticalScope ( ) )
36
+ {
37
+ MixedRealityInspectorUtility . RenderMixedRealityToolkitLogo ( ) ;
38
+
39
+ using ( new EditorGUILayout . HorizontalScope ( ) )
40
+ {
41
+ GUILayout . FlexibleSpace ( ) ;
42
+ EditorGUILayout . LabelField ( $ "Version { MRTKVersion } ", EditorStyles . wordWrappedLabel ) ;
43
+ GUILayout . FlexibleSpace ( ) ;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments