From 3105266075e4fe0c83d1fb7bf816af99fea7dc58 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 09:44:51 -0800 Subject: [PATCH 1/9] Create MRTK.Generated.sentinel --- .../Assets/MRTK.Generated/MRTK.Generated.sentinel | 0 .../Assets/MRTK.Generated/MRTK.Generated.sentinel.meta | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel create mode 100644 UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel.meta diff --git a/UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel b/UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel new file mode 100644 index 000000000..e69de29bb diff --git a/UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel.meta b/UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel.meta new file mode 100644 index 000000000..174cbfd81 --- /dev/null +++ b/UnityProjects/MRTKDevTemplate/Assets/MRTK.Generated/MRTK.Generated.sentinel.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2402dd68deefc124ca12b591c71a7a05 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 7a0697afc87a866b4e7a68725573be04aa18cec4 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 11:33:06 -0800 Subject: [PATCH 2/9] Create MRTKFiles --- .../Editor/MRTKFiles.cs | 93 +++++++++++++++++++ .../Editor/MRTKFiles.cs.meta | 11 +++ 2 files changed, 104 insertions(+) create mode 100644 org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs create mode 100644 org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs.meta diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs new file mode 100644 index 000000000..73bf8eefd --- /dev/null +++ b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs @@ -0,0 +1,93 @@ +// Copyright (c) Mixed Reality Toolkit Contributors +// Licensed under the BSD 3-Clause + +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace MixedReality.Toolkit.Editor +{ + public class MRTKFiles + { + private const string GeneratedName = "MRTK.Generated"; + private const string GeneratedSentinelFileName = GeneratedName + ".sentinel"; + + private static readonly string DefaultGeneratedFolderPath = Path.Combine("Assets", GeneratedName); + private static readonly string DefaultSentinelFilePath = Path.Combine(DefaultGeneratedFolderPath, GeneratedSentinelFileName); + private static string generatedFolderPath = string.Empty; + + public static string GeneratedFolderPath + { + get + { + if (string.IsNullOrWhiteSpace(generatedFolderPath)) + { + foreach (string guid in AssetDatabase.FindAssets(GeneratedName)) + { + string path = AssetDatabase.GUIDToAssetPath(guid); + if (path.Contains(GeneratedSentinelFileName)) + { + generatedFolderPath = Path.GetDirectoryName(path); + return generatedFolderPath; + } + } + + + //string[] filePathResults = Directory.GetFiles(Application.dataPath, GeneratedSentinelFileName, SearchOption.AllDirectories); + //if (filePathResults.Length > 0) + //{ + // generatedFolderPath = Path.GetDirectoryName(filePathResults[0]); + // if (filePathResults.Length > 1) + // { + // Debug.LogWarning($"{filePathResults.Length} MRTK.Generated sentinels were found.\nUsing the one in {generatedFolderPath}"); + // } + //} + //else + //{ + if (!Directory.Exists(DefaultGeneratedFolderPath)) + { + Directory.CreateDirectory(DefaultGeneratedFolderPath); + } + + if (!File.Exists(DefaultSentinelFilePath)) + { + // Make sure we create and dispose/close the filestream just created + using (FileStream f = File.Create(DefaultSentinelFilePath)) { } + } + generatedFolderPath = DefaultGeneratedFolderPath; + //} + } + return generatedFolderPath; + } + } + + private class AssetPostprocessor : UnityEditor.AssetPostprocessor + { + public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) + { + foreach (string asset in deletedAssets.Concat(movedFromAssetPaths)) + { + if (Path.GetFileName(asset) == GeneratedSentinelFileName && Path.GetDirectoryName(asset) == generatedFolderPath) + { + generatedFolderPath = string.Empty; + } + } + + foreach (string asset in importedAssets.Concat(movedAssets)) + { + if (Path.GetFileName(asset) == GeneratedSentinelFileName) + { + string newPath = Path.GetDirectoryName(asset); + if (generatedFolderPath != string.Empty && generatedFolderPath != newPath) + { + Debug.LogWarning($"Previous MRTK.Generated folder was not unregistered properly: {generatedFolderPath}.\nReplacing with {newPath}"); + } + Debug.Log($"Found MRTK.Generated at {newPath}."); + generatedFolderPath = newPath; + } + } + } + } + } +} diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs.meta b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs.meta new file mode 100644 index 000000000..53ba7cceb --- /dev/null +++ b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec43400d20c14a248a30d6d4196d669e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 3e3acf607e75f338728f787ab47ff52e611fefbf Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 11:33:15 -0800 Subject: [PATCH 3/9] Update MRTKSettings.cs --- org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs b/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs index f3e86bae2..6dd07baea 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs @@ -14,8 +14,7 @@ namespace MixedReality.Toolkit.Editor [System.Serializable] public class MRTKSettings : ScriptableObject { - internal const string MRTKGeneratedFolder = "Assets/MRTK.Generated"; - internal const string MRTKSettingsPath = MRTKGeneratedFolder + "/MRTKSettings.asset"; + internal static string MRTKSettingsPath => Path.Combine(MRTKFiles.GeneratedFolderPath, "MRTKSettings.asset"); [SerializeField] private SerializableDictionary settings = new SerializableDictionary(); @@ -83,11 +82,6 @@ internal static MRTKSettings GetOrCreateSettings() var settings = AssetDatabase.LoadAssetAtPath(MRTKSettingsPath); if (settings == null) { - if (!Directory.Exists(MRTKGeneratedFolder)) - { - Directory.CreateDirectory(MRTKGeneratedFolder); - } - settings = CreateInstance(); AssetDatabase.CreateAsset(settings, MRTKSettingsPath); AssetDatabase.SaveAssets(); From 1d515447ca9de6ce4b668570c4d4ead6b65515ae Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 12:34:29 -0800 Subject: [PATCH 4/9] Update MRTKFiles.cs --- .../Editor/MRTKFiles.cs | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs index 73bf8eefd..bdaa1212c 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs @@ -33,30 +33,17 @@ public static string GeneratedFolderPath } } + if (!Directory.Exists(DefaultGeneratedFolderPath)) + { + Directory.CreateDirectory(DefaultGeneratedFolderPath); + } - //string[] filePathResults = Directory.GetFiles(Application.dataPath, GeneratedSentinelFileName, SearchOption.AllDirectories); - //if (filePathResults.Length > 0) - //{ - // generatedFolderPath = Path.GetDirectoryName(filePathResults[0]); - // if (filePathResults.Length > 1) - // { - // Debug.LogWarning($"{filePathResults.Length} MRTK.Generated sentinels were found.\nUsing the one in {generatedFolderPath}"); - // } - //} - //else - //{ - if (!Directory.Exists(DefaultGeneratedFolderPath)) - { - Directory.CreateDirectory(DefaultGeneratedFolderPath); - } - - if (!File.Exists(DefaultSentinelFilePath)) - { - // Make sure we create and dispose/close the filestream just created - using (FileStream f = File.Create(DefaultSentinelFilePath)) { } - } - generatedFolderPath = DefaultGeneratedFolderPath; - //} + if (!File.Exists(DefaultSentinelFilePath)) + { + // Make sure we create and dispose/close the filestream just created + using (FileStream f = File.Create(DefaultSentinelFilePath)) { } + } + generatedFolderPath = DefaultGeneratedFolderPath; } return generatedFolderPath; } From a2a3507ed6630d723deb1ae70e796ba3070ca33c Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 12:57:51 -0800 Subject: [PATCH 5/9] Update hardcoded "MRTK.Generated" usages --- org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs | 2 +- .../SubsystemWizard/SubsystemGenerator.cs | 4 ++-- .../SubsystemWizard/SubsystemWizardWindow.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs b/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs index 52dfa7f22..71c854372 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs @@ -51,7 +51,7 @@ private static SettingsProvider BuildPreferences() static void GUIHandler(string searchContext) { - EditorGUILayout.HelpBox("These settings are serialized into MRTKSettings.asset in the MRTK.Generated folder.\nThis file can be checked into source control to maintain consistent settings across collaborators.", MessageType.Info); + EditorGUILayout.HelpBox($"These settings are serialized into MRTKSettings.asset in {MRTKFiles.GeneratedFolderPath}.\nThis file can be checked into source control to maintain consistent settings across collaborators.", MessageType.Info); DrawAppLauncherModelField(); } diff --git a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs index e23be5962..1366881d6 100644 --- a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs +++ b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs @@ -2,6 +2,7 @@ // Licensed under the BSD 3-Clause using Microsoft.CSharp; +using MixedReality.Toolkit.Editor; using System; using System.Collections.Generic; using System.IO; @@ -33,7 +34,6 @@ internal class SubsystemGenerator private const bool DefaultCreateConfiguration = false; private static readonly string DefaultBaseSubsystemName = $"NewSubsystem"; - private static readonly string OutputFolderRoot = Path.Combine("Assets", "MRTK.Generated"); [SerializeField] private SubsystemWizardState state = SubsystemWizardState.Start; @@ -159,7 +159,7 @@ public void Generate( { // Make sure there is a folder in which to create the new files. DirectoryInfo outputFolder = new DirectoryInfo( - Path.Combine(OutputFolderRoot, SubsystemName)); + Path.Combine(MRTKFiles.GeneratedFolderPath, SubsystemName)); if (!outputFolder.Exists) { outputFolder.Create(); diff --git a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs index e6724334b..287925745 100644 --- a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs +++ b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs @@ -247,7 +247,7 @@ private void RenderWizardPreGeneratePage() } EditorGUILayout.LabelField( - $"The new subsystem will be created in your project's MRTK.Generated/{subsystemGenerator.SubsystemName} folder.", + $"The new subsystem will be created in your project's {Path.Combine(MRTKFiles.GeneratedFolderPath, subsystemGenerator.SubsystemName)} folder.", EditorStyles.boldLabel); EditorGUILayout.Space(6); @@ -345,7 +345,7 @@ private void RenderWizardCompletePage() { StringBuilder sb = new StringBuilder(); int step = 1; - sb.AppendLine($" {step}. In the Project view, navigate to Assets/MRTK.Generated/{subsystemGenerator.SubsystemName}"); + sb.AppendLine($" {step}. In the Project view, navigate to {Path.Combine(MRTKFiles.GeneratedFolderPath, subsystemGenerator.SubsystemName)}"); step++; sb.AppendLine($" {step}. Open {subsystemGenerator.DescriptorName}.cs"); step++; From 7f5e8006fce56fda21accdd40cab3a362b6db08a Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 13:09:18 -0800 Subject: [PATCH 6/9] Update MRTKFiles.cs --- org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs index bdaa1212c..3d02fc8ac 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs @@ -41,7 +41,7 @@ public static string GeneratedFolderPath if (!File.Exists(DefaultSentinelFilePath)) { // Make sure we create and dispose/close the filestream just created - using (FileStream f = File.Create(DefaultSentinelFilePath)) { } + using FileStream f = File.Create(DefaultSentinelFilePath); } generatedFolderPath = DefaultGeneratedFolderPath; } @@ -58,6 +58,7 @@ public static void OnPostprocessAllAssets(string[] importedAssets, string[] dele if (Path.GetFileName(asset) == GeneratedSentinelFileName && Path.GetDirectoryName(asset) == generatedFolderPath) { generatedFolderPath = string.Empty; + break; } } @@ -66,12 +67,16 @@ public static void OnPostprocessAllAssets(string[] importedAssets, string[] dele if (Path.GetFileName(asset) == GeneratedSentinelFileName) { string newPath = Path.GetDirectoryName(asset); - if (generatedFolderPath != string.Empty && generatedFolderPath != newPath) + if (generatedFolderPath != newPath) { - Debug.LogWarning($"Previous MRTK.Generated folder was not unregistered properly: {generatedFolderPath}.\nReplacing with {newPath}"); + if (generatedFolderPath != string.Empty) + { + Debug.LogWarning($"Previous MRTK.Generated folder was not unregistered properly: {generatedFolderPath}.\nReplacing with {newPath}"); + } + Debug.Log($"Found MRTK.Generated sentinel at {newPath}."); + generatedFolderPath = newPath; } - Debug.Log($"Found MRTK.Generated at {newPath}."); - generatedFolderPath = newPath; + break; } } } From 44f9aeea76c673bb7666ccd50199becc701249b9 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 14:20:47 -0800 Subject: [PATCH 7/9] Property to method and docs --- .../Editor/MRTKBuildPreferences.cs | 2 +- .../Editor/MRTKFiles.cs | 50 +++++++++++-------- .../Editor/MRTKSettings.cs | 2 +- .../SubsystemWizard/SubsystemGenerator.cs | 2 +- .../SubsystemWizard/SubsystemWizardWindow.cs | 4 +- 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs b/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs index 71c854372..106c75f9b 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKBuildPreferences.cs @@ -51,7 +51,7 @@ private static SettingsProvider BuildPreferences() static void GUIHandler(string searchContext) { - EditorGUILayout.HelpBox($"These settings are serialized into MRTKSettings.asset in {MRTKFiles.GeneratedFolderPath}.\nThis file can be checked into source control to maintain consistent settings across collaborators.", MessageType.Info); + EditorGUILayout.HelpBox($"These settings are serialized into MRTKSettings.asset in {MRTKFiles.GetOrCreateGeneratedFolderPath()}.\nThis file can be checked into source control to maintain consistent settings across collaborators.", MessageType.Info); DrawAppLauncherModelField(); } diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs index 3d02fc8ac..47f21a5d5 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKFiles.cs @@ -8,6 +8,9 @@ namespace MixedReality.Toolkit.Editor { + /// + /// Provides helper methods for accessing MRTK-defined files and folders. + /// public class MRTKFiles { private const string GeneratedName = "MRTK.Generated"; @@ -17,38 +20,43 @@ public class MRTKFiles private static readonly string DefaultSentinelFilePath = Path.Combine(DefaultGeneratedFolderPath, GeneratedSentinelFileName); private static string generatedFolderPath = string.Empty; - public static string GeneratedFolderPath + /// + /// Finds the current MRTK.Generated folder based on the sentinel file. If a sentinel file is not found, + /// a new MRTK.Generated folder and sentinel are created and this new path is returned. + /// + /// The AssetDatabase-compatible path to the MRTK.Generated folder. + public static string GetOrCreateGeneratedFolderPath() { - get + if (string.IsNullOrWhiteSpace(generatedFolderPath)) { - if (string.IsNullOrWhiteSpace(generatedFolderPath)) + foreach (string guid in AssetDatabase.FindAssets(GeneratedName)) { - foreach (string guid in AssetDatabase.FindAssets(GeneratedName)) + string path = AssetDatabase.GUIDToAssetPath(guid); + if (path.Contains(GeneratedSentinelFileName)) { - string path = AssetDatabase.GUIDToAssetPath(guid); - if (path.Contains(GeneratedSentinelFileName)) - { - generatedFolderPath = Path.GetDirectoryName(path); - return generatedFolderPath; - } + generatedFolderPath = Path.GetDirectoryName(path); + return generatedFolderPath; } + } - if (!Directory.Exists(DefaultGeneratedFolderPath)) - { - Directory.CreateDirectory(DefaultGeneratedFolderPath); - } + if (!Directory.Exists(DefaultGeneratedFolderPath)) + { + Directory.CreateDirectory(DefaultGeneratedFolderPath); + } - if (!File.Exists(DefaultSentinelFilePath)) - { - // Make sure we create and dispose/close the filestream just created - using FileStream f = File.Create(DefaultSentinelFilePath); - } - generatedFolderPath = DefaultGeneratedFolderPath; + if (!File.Exists(DefaultSentinelFilePath)) + { + // Make sure we create and dispose/close the filestream just created + using FileStream f = File.Create(DefaultSentinelFilePath); } - return generatedFolderPath; + generatedFolderPath = DefaultGeneratedFolderPath; } + return generatedFolderPath; } + /// + /// Checks for an existing MRTK.Generated sentinel file on asset import. Allows the path to be pre-cached before use. + /// private class AssetPostprocessor : UnityEditor.AssetPostprocessor { public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) diff --git a/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs b/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs index 6dd07baea..64e3d85c0 100644 --- a/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs +++ b/org.mixedrealitytoolkit.core/Editor/MRTKSettings.cs @@ -14,7 +14,7 @@ namespace MixedReality.Toolkit.Editor [System.Serializable] public class MRTKSettings : ScriptableObject { - internal static string MRTKSettingsPath => Path.Combine(MRTKFiles.GeneratedFolderPath, "MRTKSettings.asset"); + internal static string MRTKSettingsPath => Path.Combine(MRTKFiles.GetOrCreateGeneratedFolderPath(), "MRTKSettings.asset"); [SerializeField] private SerializableDictionary settings = new SerializableDictionary(); diff --git a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs index 1366881d6..ea9295bfb 100644 --- a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs +++ b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemGenerator.cs @@ -159,7 +159,7 @@ public void Generate( { // Make sure there is a folder in which to create the new files. DirectoryInfo outputFolder = new DirectoryInfo( - Path.Combine(MRTKFiles.GeneratedFolderPath, SubsystemName)); + Path.Combine(MRTKFiles.GetOrCreateGeneratedFolderPath(), SubsystemName)); if (!outputFolder.Exists) { outputFolder.Create(); diff --git a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs index 287925745..c3b72de75 100644 --- a/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs +++ b/org.mixedrealitytoolkit.tools/SubsystemWizard/SubsystemWizardWindow.cs @@ -247,7 +247,7 @@ private void RenderWizardPreGeneratePage() } EditorGUILayout.LabelField( - $"The new subsystem will be created in your project's {Path.Combine(MRTKFiles.GeneratedFolderPath, subsystemGenerator.SubsystemName)} folder.", + $"The new subsystem will be created in your project's {Path.Combine(MRTKFiles.GetOrCreateGeneratedFolderPath(), subsystemGenerator.SubsystemName)} folder.", EditorStyles.boldLabel); EditorGUILayout.Space(6); @@ -345,7 +345,7 @@ private void RenderWizardCompletePage() { StringBuilder sb = new StringBuilder(); int step = 1; - sb.AppendLine($" {step}. In the Project view, navigate to {Path.Combine(MRTKFiles.GeneratedFolderPath, subsystemGenerator.SubsystemName)}"); + sb.AppendLine($" {step}. In the Project view, navigate to {Path.Combine(MRTKFiles.GetOrCreateGeneratedFolderPath(), subsystemGenerator.SubsystemName)}"); step++; sb.AppendLine($" {step}. Open {subsystemGenerator.DescriptorName}.cs"); step++; From a50316e6ed2268bb616c3e0ef8959473c7e9b9ca Mon Sep 17 00:00:00 2001 From: Kurtis Date: Thu, 9 Jan 2025 16:28:38 -0800 Subject: [PATCH 8/9] Update CHANGELOG and version --- org.mixedrealitytoolkit.core/CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.mixedrealitytoolkit.core/CHANGELOG.md b/org.mixedrealitytoolkit.core/CHANGELOG.md index d9da38446..9ba3a8598 100644 --- a/org.mixedrealitytoolkit.core/CHANGELOG.md +++ b/org.mixedrealitytoolkit.core/CHANGELOG.md @@ -10,7 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added -* Added event `OnSpeechRecognitionKeywordChanged` to allow UI updates when the speech recognition keyword has changed. [PR #792](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/792/) +* Added event `OnSpeechRecognitionKeywordChanged` to allow UI updates when the speech recognition keyword has changed. [PR #792](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/792) +* Added support for moving the MRTK.Generated folder around the project's Assets folder structure instead of enforcing a root location. [PR #969](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/969) ### Fixed @@ -39,8 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). * Added IsProximityHovered property of type TimedFlag to detect when a button starts being hovered or on interactor proximity and when it stops being hovered or on proximity of any interactor. [PR #611](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/611) * Adding ProximityHover events (Entered & Exited) to PressableButton class. [PR #611](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/611) - ### Fixed * Fixed support for UPM package publishing in the Unity Asset Store. [PR #519](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/519) -* Fix warning and event triggered on disabled StatefulInteractable after changing speech settings [PR #591](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/591) [PR #608](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/608) \ No newline at end of file +* Fix warning and event triggered on disabled StatefulInteractable after changing speech settings [PR #591](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/591) [PR #608](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/608) From 697a641aecea50d45466a32995bf9769d4397857 Mon Sep 17 00:00:00 2001 From: Kurtis Date: Mon, 13 Jan 2025 16:45:03 -0800 Subject: [PATCH 9/9] Update Tools dependency on Core --- UnityProjects/MRTKDevTemplate/Packages/packages-lock.json | 2 +- org.mixedrealitytoolkit.tools/CHANGELOG.md | 6 ++++++ org.mixedrealitytoolkit.tools/package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/UnityProjects/MRTKDevTemplate/Packages/packages-lock.json b/UnityProjects/MRTKDevTemplate/Packages/packages-lock.json index ce075f1d1..798300b97 100644 --- a/UnityProjects/MRTKDevTemplate/Packages/packages-lock.json +++ b/UnityProjects/MRTKDevTemplate/Packages/packages-lock.json @@ -400,7 +400,7 @@ "depth": 0, "source": "local", "dependencies": { - "org.mixedrealitytoolkit.core": "3.2.2" + "org.mixedrealitytoolkit.core": "3.3.0" } }, "org.mixedrealitytoolkit.uxcomponents": { diff --git a/org.mixedrealitytoolkit.tools/CHANGELOG.md b/org.mixedrealitytoolkit.tools/CHANGELOG.md index 136ff5ea9..71939c84c 100644 --- a/org.mixedrealitytoolkit.tools/CHANGELOG.md +++ b/org.mixedrealitytoolkit.tools/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## Unreleased + +### Changed + +* Updated MRTK Core Definitions dependency to 3.3.0. [PR #969](https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/pull/969) + ## [3.0.5] - 2025-11-12 ### Fixed diff --git a/org.mixedrealitytoolkit.tools/package.json b/org.mixedrealitytoolkit.tools/package.json index 9bcb37a38..6266be34f 100644 --- a/org.mixedrealitytoolkit.tools/package.json +++ b/org.mixedrealitytoolkit.tools/package.json @@ -17,6 +17,6 @@ "unityRelease": "26f1", "documentationUrl": "https://www.mixedrealitytoolkit.org", "dependencies": { - "org.mixedrealitytoolkit.core": "3.2.2" + "org.mixedrealitytoolkit.core": "3.3.0" } } \ No newline at end of file