using System.Collections; using System.Collections.Generic; using UnityEngine; public class LayoutManager : MonoBehaviour { public GameObject layout2; void Start() { } // Update is called once per frame void Update() { if (GlobalData.MyDeviceMode == DeviceMode.Gun) { if (layout2.activeSelf) { layout2.SetActive(false); } } else { if (!layout2.activeSelf) { layout2.SetActive(true); } } } }