MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

`PressableButtonHoloLens2Toggle_32x96_Dwell` does not change off-color

Open turbotimon opened this issue 2 years ago • 1 comments

Describe the bug

The Toggle-Button does not change color as set when toggled. (The function ButtonExecute in ToggleDwellPressableButton.cs is never executed.)

To reproduce

Steps to reproduce the behavior:

  1. Add a PressableButtonHoloLens2Toggle_32x96_Dwell to your scene
  2. Change dwellOffColor to e.g. red
  3. Go to play mode and toggle the button
  4. See that color doesn't get changed (well it does, but not to the color set, e.g. red)

Expected behavior

Color gets changed

Screenshots

image

Your setup (please complete the following information)

  • Unity Version 2020.3.37f1
  • MRTK Version 2.8.3

Target platform (please complete the following information)

  • HoloLens 2

Additional context

These code in ToggleDwellPressableButton.cs is never executed:

        /// <inheritdoc/>
        public override void ButtonExecute()
        {
            Debug.Log($"ButtonExecute {isDwellEnabled}"); // DEBUG test, to see it is never executed
            isDwellEnabled = !isDwellEnabled;
            dwellStatus.text = isDwellEnabled ? "On" : "Off";

            // swap the button background and dwell visuals overlay color
            buttonBackground.material.color = isDwellEnabled ? this.dwellOnColor : this.dwellOffColor;
            dwellVisualImage.material.color = isDwellEnabled ? this.dwellOffColor : this.dwellOnColor;
        }

turbotimon avatar Jan 10 '23 17:01 turbotimon

in addition: the field bool isDwellEnabled is logically rather a isToggled or not?

turbotimon avatar Jan 11 '23 10:01 turbotimon

Seems related to #11367

@marlenaklein-msft can you check if this is reproducible in MRTK3

AMollis avatar Mar 07 '23 05:03 AMollis

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 visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

IssueSyncBot avatar Jan 13 '24 00:01 IssueSyncBot