DebugUI AddLabel issues — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

DebugUI AddLabel issues

kingarrillakingarrilla Posts: 7
edited September 10 in Unity Development
DebugUIBuilder.instance.AddSlider("Gain", 0.0f, 4.0f, SliderPressed, false, 2);

1) When this Slider appears in the panel, the slider label is set to "slider label" - should it not read "Gain"?

To get it to read "Gain" I have to set it explicitly

var sliderPrefab = DebugUIBuilder.instance.AddSlider("Gain", 0.0f, 4.0f, SliderPressed, false, 2);var textElementsInSlider = sliderPrefab.GetComponentsInChildren<Text>();Assert.AreEqual(textElementsInSlider.Length, 2, "Slider prefab format requires 2 text components (label + value)");sliderText = textElementsInSlider[1];Assert.IsNotNull(sliderText, "No text component on slider prefab");textElementsInSlider[0].text = "Gain";

2) How can I set the initial value of the slider? For example, in this use the initial value of Gain is 1.0f but the slider is set at 0. It's not a show stopper, but useful to have this default value to be set somewhere in the range.

Sign In or Register to comment.