using System.Collections; using System.Collections.Generic; using UnityEngine; using System; namespace UnityEngine.UCMobile { [Serializable] public abstract class UCMobileModel { [SerializeField, GetSet("used")] public bool IsUsed; [SerializeField, GetSet("enabled")] bool m_Enabled; public bool enabled { get { return m_Enabled; } set { m_Enabled = value; if (value) OnValidate(); } } public abstract void DoBehavier(GameObject obj); public abstract void Reset(); public virtual void OnValidate() { } } public sealed class GetSetAttribute : PropertyAttribute { public readonly string name; public bool dirty; public GetSetAttribute(string name) { this.name = name; } } }