using System; using Sirenix.OdinInspector; using UnityEngine; namespace Cielonos.MainGame { public class SubcontrollerBase : SerializedMonoBehaviour where T : MonoBehaviour { public T owner; public virtual void Initialize() { owner ??= GetComponent() ?? GetComponentInParent(); } #if UNITY_EDITOR protected virtual void Reset() { owner ??= GetComponent() ?? GetComponentInParent(); } #endif } }