コード例 #1
0
        protected override void Run(UIEventType.InnerDestroyWindow args)
        {
            var    target = args.target;
            Entity view   = target.GetComponent(target.ViewType);

            if (view != null)
            {
                var obj = view.GetGameObject();
                if (obj)
                {
                    if (GameObjectPoolComponent.Instance == null)
                    {
                        GameObject.Destroy(obj);
                    }
                    else
                    {
                        GameObjectPoolComponent.Instance.RecycleGameObject(obj);
                    }
                }
                view.BeforeOnDestroy();
                UIEventSystem.Instance.OnDestroy(view);
            }
        }