You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change UnityEngine.Experimental.UIElements.Toggle(Action clickEvent) to UnityEngine.Experimental.UIElements.Toggle(Action<bool> clickEvent).
It will simplify design.
This:
void OnEnable()
{
var root = this.GetRootVisualContainer();
toggle = new UnityEngine.Experimental.UIElements.Toggle(x=> Debug.Log(x));
root.Add(toggle);
}
instead of this:
void OnEnable()
{
var root = this.GetRootVisualContainer();
toggle = new UnityEngine.Experimental.UIElements.Toggle(Test);
root.Add(toggle);
}
Toggle toogle;
void Test()
{
Debug.Log(toogle.on);
}
The text was updated successfully, but these errors were encountered:
Change
UnityEngine.Experimental.UIElements.Toggle(Action clickEvent)
toUnityEngine.Experimental.UIElements.Toggle(Action<bool> clickEvent)
.It will simplify design.
This:
instead of this:
The text was updated successfully, but these errors were encountered: