Closed AdamMitchell-ms closed 10 months ago
The intention was to provide a generic pressable button and HoloLens2 'style' button that has additional components such as moving icon & text or front plate/highlight plate. @julenka for any additional context.
Should we rename this to "HoloLens2StyleButton"?
PressableButtonHoloLens2Style would be my (verbose) suggestion.
PressableButtonHoloLens2Style would be my (verbose) suggestion.
Button should be at the end of the name for consistent naming convention.
One thing to consider is how a name change may impact existing applications. If it is simply the prefab name(s) changing, Unity's .meta files should properly handle the change provided the files are renamed in Unity.
Also, thanks @AdamMitchell-ms for mentioning adding [Obsolete] to the legacy class names
This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.
This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Prefabs
Problem
Some devs I've worked with have wrongly concluded that the PressableButtonHoloLens2.prefab and similarly named classes and prefabs work only on HoloLens2. This naming scheme is confusing people.
Proposal
Just rename them to remove the HoloLens2 portion of the name.
Classes
Problem
PressableButtonHololens2.cs provides a strict superset of functionality given by PressableButton.cs. Why even have both classes? Also the functionality that it gives is really just to add a compressable cube and an icon/text object. These are not really HL2-specific.
Proposal
Move all the functionality of PressableButtonHololens2.cs into PressableButton.cs. Make PressableButtonHololens2 an empty class which derives from PressableButton and has an [Obsolete] attribute.
Note on renaming difficulty
Renaming things in Unity has some quirks. For users consuming this via a submodule or file copy, if you move/rename the meta files properly, Unity will automatically rewire things for you and it will work.
For users consuming via a nuget package, upgrade scripts are required because the meta files are not present in the nuget package. I've done this with .cs files before but have not done it with .prefab files. So I'm not sure of the feasibility.