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

Changing StepSlider's SliderStepDivisions at runtime does not affect the StepSlider #10189

Closed andikay closed 9 months ago

andikay commented 3 years ago

I have been working quite a bit with the StepSlider component recently and I noticed an(other) issue with it.

I have created a small script that calculates the required steps for the StepSlider via the possible values of the Unity Slider and then set the SliderStepDivisions accordingly, but I had to realize that this does not work - even though the calculated number is visible in the Unity Editor component. stepSlider.SliderStepDivisions = (int)slider.maxValue - (int)slider.minValue;

When I set the SliderStepDivisions in the Unity Editor before pressing the Play button it works perfectly, but when I set the SliderStepDivisions via a C# script at runtime it actually has no effect on the StepSlider at all. This is unfortunate because it means that I have to calculate the steps for each slider beforehand and enter the value in the Unity Editor instead of just letting the script calculate it and set it at runtime. It would be great if setting the SliderStepDivisions at runtime would work.

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.

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!