using System; using UnityEngine; using ZXL.ID; namespace Script.UI.Process { public abstract class ProcessBase : MonoBehaviour, IProcess { [SerializeField] private int _id; [SerializeField] private ProcessType _processType; public int ID => _id; public ProcessType processType => _processType; private void Awake() { Init(); gameObject.SetActive(false); } private void OnDestroy() { Dispose(); } // private void OnEnable() // { // Enter(); // } // // private void OnDisable() // { // Exit(); // } public virtual void Enter() { gameObject.SetActive(true); Debug.Log($"start process : {_processType}"); } public virtual void Exit() { gameObject.SetActive(false); Debug.Log($"stop process : {_processType}"); } public virtual void Init() { } public virtual void Dispose() { } } }