Firstborn/Assets/Scripts/ToggleOffOn.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

27 lines
454 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ToggleOffOn : MonoBehaviour
{
public Toggle MyToggle;
public GameObject MyOBJ;
public void Vanish() {
if (MyToggle.isOn == false) {
MyOBJ.SetActive(false);
} else {
MyOBJ.SetActive(true);
}
}
public void ToggleMe() {
if (MyToggle.isOn == false) {
MyToggle.isOn = true;
} else {
MyToggle.isOn = false;
}
}
}