using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class ButtonEvenetR : BaseView { // Use this for initialization public InspectListPanel inspectPanle; public int buttonIndex = 0; public override void OnEnter(BaseEventData data) { if (InspectListPanel.taskIndex < inspectPanle.taskList.Count - 1) { buttonIndex = 1; inspectPanle.rightButton_show.gameObject.SetActive(true); } else { buttonIndex = 0; inspectPanle.rightButton_show.gameObject.SetActive(false); } } public override void OnExit(BaseEventData data) { buttonIndex = 0; inspectPanle.rightButton_show.gameObject.SetActive(false); } }