using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ExternalForceToggle : BaseToggle { public GameObject panel; public override void RespondFun(bool value) { if (panel == null) { panel = transform.Find("Panel").gameObject; } panel.SetActive(value); } void Awake() { if(GetComponent().group == null) { GetComponent().group = transform.parent.GetComponent(); } } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }