using System.Collections; using System.Collections.Generic; using UnityEngine; public class LocomotionSettingButton : MonoBehaviour { private MeshCollider _collider; public GameObject LocomotionPanel; // Start is called before the first frame update void Start() { _collider = GetComponent(); LocomotionPanel.SetActive(false); } private void OnTriggerEnter(Collider other) { if (other.tag == "Hand") { LocomotionPanel.SetActive(!LocomotionPanel.activeSelf); } } }