Skip to content

Commit 45f663b

Browse files
committed
Move ThemeBinding into UXCore
1 parent 90d6312 commit 45f663b

8 files changed

Lines changed: 62 additions & 1 deletion

File tree

org.mixedrealitytoolkit.theming/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ The system has three layers:
1212
| **Values** | `Theme` (ScriptableObject) | Provides a concrete value for every item in the definition |
1313
| **Binding** | `ThemeBinding` (MonoBehaviour) + binders | Connects a theme item to a specific component on a GameObject |
1414

15+
> [!NOTE]
16+
> `ThemeBinding` exists in the UX Core package for cross-package compatibility.
17+
1518
---
1619

1720
## Theme data source

org.mixedrealitytoolkit.uxcore/Theming.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Mixed Reality Toolkit Contributors
2+
// Licensed under the BSD 3-Clause
3+
4+
using System.Reflection;
5+
6+
[assembly: AssemblyProduct("Mixed Reality Toolkit UX Core Theming")]
7+
[assembly: AssemblyCopyright("Copyright (c) Mixed Reality Toolkit Contributors")]
8+
9+
// The AssemblyVersion attribute is checked-in and is recommended not to be changed often.
10+
// https://docs.microsoft.com/troubleshoot/visualstudio/general/assembly-version-assembly-file-version
11+
// AssemblyFileVersion and AssemblyInformationalVersion are added by pack-upm.ps1 to match the current MRTK build version.
12+
[assembly: AssemblyVersion("4.0.0.0")]

org.mixedrealitytoolkit.uxcore/Theming/AssemblyInfo.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "MixedReality.Toolkit.UXCore.Theming",
3+
"rootNamespace": "MixedReality.Toolkit.UX",
4+
"references": [
5+
"GUID:56255bd5d851a6243b63cb370cfc40b1",
6+
"GUID:2238d58cada9b6746a548c6bff32c381"
7+
],
8+
"includePlatforms": [],
9+
"excludePlatforms": [],
10+
"allowUnsafeCode": false,
11+
"overrideReferences": false,
12+
"precompiledReferences": [],
13+
"autoReferenced": true,
14+
"defineConstraints": [],
15+
"versionDefines": [
16+
{
17+
"name": "org.mixedrealitytoolkit.theming",
18+
"expression": "",
19+
"define": "MRTK_THEMING_PRESENT"
20+
}
21+
],
22+
"noEngineReferences": false
23+
}

org.mixedrealitytoolkit.uxcore/Theming/MRTK.UXCore.Theming.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

org.mixedrealitytoolkit.theming/Theming/ThemeBinding.cs renamed to org.mixedrealitytoolkit.uxcore/Theming/ThemeBinding.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
// Copyright (c) Mixed Reality Toolkit Contributors
22
// Licensed under the BSD 3-Clause
33

4+
#if MRTK_THEMING_PRESENT
5+
using MixedReality.Toolkit.Theming;
6+
#endif
7+
48
using UnityEngine;
59

6-
namespace MixedReality.Toolkit.Theming
10+
namespace MixedReality.Toolkit.UX
711
{
812
public class ThemeBinding : MonoBehaviour
913
{
14+
#if MRTK_THEMING_PRESENT
1015
[SerializeField]
1116
[Tooltip("The theme data source manager.")]
1217
private ThemeDataSource themeDataSource;
@@ -47,5 +52,6 @@ protected void OnDisable()
4752
binder?.Unsubscribe(themeDataSource);
4853
}
4954
}
55+
#endif
5056
}
5157
}

org.mixedrealitytoolkit.theming/Theming/ThemeBinding.cs.meta renamed to org.mixedrealitytoolkit.uxcore/Theming/ThemeBinding.cs.meta

File renamed without changes.

0 commit comments

Comments
 (0)