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