protected override void OnDestroy()
        {
            base.OnDestroy();
            m_ObjDrawer.OnDestroy();
            string id = GetID(false);

            if (EditorPrefsEx.HasKey(id))
            {
                EditorPrefsEx.DeleteKey(id);
            }
        }
        public SubWindowObjectDrawer(SubWindowCustomDrawer drawer)
        {
            this.m_ObjDrawer = drawer;
            if (m_ObjDrawer == null)
            {
                return;
            }
            string id = GetID(false);

            if (EditorPrefsEx.HasKey(id))
            {
                var obj = EditorPrefsEx.GetObject(id, drawer.GetType());
                if (obj != null)
                {
                    drawer = (SubWindowCustomDrawer)obj;
                    drawer.SetContainer(this.m_ObjDrawer.Container);
                    this.m_ObjDrawer = drawer;
                }
            }
        }
예제 #3
0
        public EWMsgBoxObjectDrawer(EWMsgBoxCustomDrawer drawer)
        {
            m_Drawer = drawer;
            if (m_Drawer == null)
            {
                return;
            }
            string id = GetID();

            if (EditorPrefsEx.HasKey(id))
            {
                var obj = EditorPrefsEx.GetObject(id, drawer.GetType());
                if (obj != null)
                {
                    drawer = (EWMsgBoxCustomDrawer)obj;
                    drawer.SetContainer(this.m_Drawer.Container);
                    drawer.closeAction = this.m_Drawer.closeAction;
                    this.m_Drawer      = drawer;
                }
            }
        }