30 lines
596 B
C#
30 lines
596 B
C#
using UnityEngine;
|
|
|
|
public class UITestMono : MonoBehaviour
|
|
{
|
|
public UXButton btnTest;
|
|
public bool selected;
|
|
|
|
[Sirenix.OdinInspector.Button]
|
|
public void DoSelect()
|
|
{
|
|
btnTest.SetSelect(selected, true);
|
|
}
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
btnTest.onValueChanged.AddListener(OnvalueChanged);
|
|
}
|
|
|
|
private void OnvalueChanged(bool arg0)
|
|
{
|
|
Debug.Log($"ValueChanged {arg0}");
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
}
|
|
}
|