18 lines
365 B
C#
18 lines
365 B
C#
using UnityEngine;
|
|
|
|
public class ActiveToggle : MonoBehaviour
|
|
{
|
|
public GameObject gameObject;
|
|
|
|
public void ToggleActive()
|
|
{
|
|
gameObject.SetActive(!gameObject.activeSelf);
|
|
}
|
|
|
|
public void ToggleActive(GameObject obj)
|
|
{
|
|
obj.SetActive(!obj.activeSelf);
|
|
Debug.Log(obj.ToString() + "Set Active: " + obj.activeSelf);
|
|
}
|
|
}
|