using CommonLang; using UnityEngine; namespace ET.Client { [ComponentOf(typeof(Scene))] public class ModelViewComponent : Entity, IAwake, IDestroy { [StaticField] public static ModelViewComponent Instance; } [FriendOf(typeof(ModelViewComponent))] public static class ModelViewComponentSystem { [ObjectSystem] public class ModelViewComponentAwakeSystem : AwakeSystem { protected override void Awake(ModelViewComponent self) { ModelViewComponent.Instance = self; } } [ObjectSystem] public class ModelViewComponentDestroySystem : DestroySystem { protected override void Destroy(ModelViewComponent self) { ModelViewComponent.Instance = null; } } } }