switchsomething.cs 432 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class switchsomething : MonoBehaviour
  5. {
  6. public GameObject GameObject;
  7. public bool Status = true;
  8. public void SwitchIt(bool input)
  9. {
  10. Status = input;
  11. if (input == false)
  12. {
  13. GameObject.SetActive(true);
  14. }
  15. else
  16. {
  17. GameObject.SetActive(false);
  18. }
  19. }
  20. }