using UnityEngine;
using UnityEngine.SceneManagement;

namespace Cryville.Crtr.Config {
	public class ConfigScene : MonoBehaviour {
		[SerializeField]
		Transform m_content;

		public void SwitchCategory(GameObject cat) {
			foreach (Transform c in m_content) {
				c.gameObject.SetActive(false);
			}
			cat.SetActive(true);
		}

		public void ReturnToMenu() {
			GameObject.Find("Master").GetComponent<Master>().ShowMenu();
#if UNITY_5_5_OR_NEWER
			SceneManager.UnloadSceneAsync("Config");
#elif UNITY_5_3_OR_NEWER
			SceneManager.UnloadScene("Config");
#endif
		}
	}
}
