Give us as much detail as possible regarding the issue you're experiencing.
Unity Editor version: 2022.2.18
ML2 OS version: 1.2.0
MLSDK version: 1.2.0
Host OS: MacOS
I have a question regarding segmented dimmer. I wanted to change the effect of the darkness of segmented dimming, so I made it possible to change the DisplayOpacity of the SegmentedDimmerMaterial by using the slider in the following code.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.MagicLeap;
public class dim_controller : MonoBehaviour
{
public float opacity = 1.0f;
[SerializeField]
private UnityEngine.UI.Slider slider;
void Start()
{
Renderer renderer = GetComponent<Renderer>();
renderer.material.SetFloat("_DimmingValue", opacity);
slider.value = opacity;
}
public void SetValue(float value)
{
Renderer renderer = GetComponent<Renderer>();
renderer.material.SetFloat("_DimmingValue", value);
}
}
When I change the slider, I can see that the DisplayOpacity is changing, but when I run the application in ML2, the darkness does not change at all. Why is this?