microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Custom speech command label is overwrite by ButtonConfigHelper editor #10283

Closed dudziakl closed 9 months ago

dudziakl commented 2 years ago

Describe the bug

ButtonConfigHelper Editor script has bug that that overwrite custom speech command label when editor is opened. Value of Display Speech Command is not stored inside of button game object and custom editor cannot load unchecked state during loading that cause to overwrite value in See it / Say it label with default Say "Select".

To reproduce

Steps to reproduce the behavior:

  1. Create new Unity project
  2. Import MRTK 2.7.2
  3. Add Pressable button to SampleScene (for example PressableButtonHoloLens2_48x48)
  4. Select prefab in hierarchy view and scroll inspector to the ButtonConfigHelper component
  5. Uncheck Display Speech Command field
  6. In the See it / Say it Label text field change Say "Select" to any custom text (for example test)
  7. Save the scene and close Unity
  8. Open Unity with sample scene
  9. Select the button prefab on the scene then scroll down Inspector view to find ButtonConfigHelper script
  10. Notice that SampleScene will be modified when you open button object (will have * after name)
  11. Notice that Display Speech Command will be checked and See it / Say it Label field will be hidden
  12. If you unselect Display Speech Command then See it / Say it Label text field will appear but its text will be overwritten with Say "Select"

Expected behavior

ButtonConfigHelper editor script should serialize value of Display Speech Command field into game object, to be able to read it it later and does not overwrite See it / Say it label value.

Screenshots

image

Your setup (please complete the following information)

Target platform (please complete the following information)

All platforms

Additional context

Workaround is to remove ButtonConfigHelper script from button prefabs or add one fake button after scene is loaded, then open custom editor uncheck Display Speech Command field (that will uncheck it for all other buttons), then remove this fake button from the scene. This have to be repeat each time when scene is opened.

polar-kev commented 2 years ago

Thanks for filing @dudziakl.

stale[bot] commented 2 years ago

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.

mvanoirschot commented 1 year ago

This issue still persists, with the exact same repro steps.

IssueSyncBot commented 9 months ago

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!