Mixedrealitytoolkit-unity: HoloLens2 naming is confusing people

Created on 26 Sep 2019  路  7Comments  路  Source: microsoft/MixedRealityToolkit-Unity

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.

Current Iteration Stale UX Controls - Buttons

Most helpful comment

Should we rename this to "HoloLens2StyleButton"?

All 7 comments

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.

Reference:
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Documentation/README_Button.md

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alexees picture Alexees  路  3Comments

provencher picture provencher  路  3Comments

dustin2711 picture dustin2711  路  3Comments

MatteoFantasy picture MatteoFantasy  路  3Comments

overedge picture overedge  路  3Comments