add project files

This commit is contained in:
Boris Nikolaev
2026-08-14 01:58:31 +03:00
parent 9134cad79b
commit 5f1e94b653
4399 changed files with 12286903 additions and 0 deletions
@@ -0,0 +1,33 @@
using System;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Serialization;
namespace OHM.UnityToolkit
{
[RequireComponent(typeof(Toggle))]
public class UIToggleOffGraphic : MonoBehaviour
{
[SerializeField]
[FormerlySerializedAs("offGraphic")]
private Graphic _offGraphic;
[SerializeField]
private Toggle toggle;
private void Awake()
{
ComponentsUtils.GetRequiredComponent(base.transform, ref toggle);
toggle.onValueChanged.AddListener(OnToggleChanged);
}
private void OnToggleChanged(bool value)
{
if (_offGraphic != null)
{
_offGraphic.gameObject.SetActive(!toggle.isOn);
}
}
}
}