Skip to content

Commit aeb93f9

Browse files
Soft Dependencies for Text Mesh Pro, UGUI, and the "New" Input System (#138)
1 parent 9ea4660 commit aeb93f9

29 files changed

Lines changed: 259 additions & 76 deletions

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/CanvasElementBeveledRectInspector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using UnityEditor;
56
using UnityEngine;
67

@@ -29,3 +30,4 @@ private static void CreateCanvasElement(MenuCommand menuCommand)
2930
}
3031
}
3132
}
33+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/CanvasElementMeshtInspector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using UnityEditor;
56

67
namespace Microsoft.MixedReality.GraphicsTools.Editor
@@ -18,3 +19,4 @@ private static void CreateCanvasElement(MenuCommand menuCommand)
1819
}
1920
}
2021
}
22+
#endif

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/CanvasElementRoundedRectInspector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using UnityEditor;
56
using UnityEngine;
67

@@ -29,3 +30,4 @@ private static void CreateCanvasElement(MenuCommand menuCommand)
2930
}
3031
}
3132
}
33+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/CanvasInspector.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using System;
56
using System.Collections.Generic;
67
using System.Reflection;
@@ -178,4 +179,5 @@ private static void GetChildMasksThatRequireRectMask2DFast(UnityEngine.Object[]
178179
}
179180
}
180181
}
181-
}
182+
}
183+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/CanvasRendererInspector.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using System;
56
using System.Collections.Generic;
67
using System.Reflection;
@@ -128,4 +129,5 @@ private static void GetGraphicsWhichRequireScaleMeshEffect(UnityEngine.Object[]
128129
}
129130
}
130131

131-
}
132+
}
133+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/RectMask2DFastInspector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using UnityEditor;
56
using UnityEditor.UI;
67

@@ -20,3 +21,4 @@ private static void CreateCanvasElement(MenuCommand menuCommand)
2021
}
2122
}
2223
}
24+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/RectMask2DInspector.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using System;
56
using System.Collections.Generic;
67
using System.Reflection;
@@ -99,5 +100,5 @@ public static void ReplaceRectMaskWithRectMask2DFast(RectMask2D mask)
99100
mask.padding = oldPadding;
100101
}
101102
}
102-
103-
}
103+
}
104+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Inspectors/RoundedRectMask2DInspector.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_UGUI
45
using UnityEditor;
56
using UnityEngine;
67

@@ -124,3 +125,4 @@ public override void OnInspectorGUI()
124125
}
125126
}
126127
}
128+
#endif // GT_USE_UGUI

com.microsoft.mrtk.graphicstools.unity/Editor/Microsoft.MixedReality.GraphicsTools.Editor.asmdef

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
"name": "com.unity.render-pipelines.universal",
2020
"expression": "10.6.0",
2121
"define": "GT_USE_URP"
22+
},
23+
{
24+
"name": "com.unity.textmeshpro",
25+
"expression": "3.0.6",
26+
"define": "GT_USE_TMP"
27+
},
28+
{
29+
"name": "com.unity.ugui",
30+
"expression": "1.0.0",
31+
"define": "GT_USE_UGUI"
32+
},
33+
{
34+
"name": "com.unity.inputsystem",
35+
"expression": "1.3.0",
36+
"define": "GT_USE_INPUT_SYSTEM"
2237
}
2338
],
2439
"noEngineReferences": false

com.microsoft.mrtk.graphicstools.unity/Editor/ShaderGUIs/TextMeshProShaderGUI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#if GT_USE_TMP
45
using TMPro.EditorUtilities;
56
using UnityEditor;
67
using UnityEngine;
@@ -93,3 +94,4 @@ protected void DoModePanel()
9394
}
9495
}
9596
}
97+
#endif // GT_USE_TMP

0 commit comments

Comments
 (0)