Component增加了一个IComponentSerialize接口,该接口增加的原因是,对象在反序列化之后
(比如对象迁移,从数据库中读取出来)需要做一些操作,比如Add到EventSystem从而注册Update等事件, 但是,如果在EndInit方法中注册到EventSystem的话,对象传到DBServer就也会注册,因此这种需求不能 自动化,必须让开发者手动调用。
Showing
想要评论请 注册 或 登录
从无法访问的项目Fork
(比如对象迁移,从数据库中读取出来)需要做一些操作,比如Add到EventSystem从而注册Update等事件, 但是,如果在EndInit方法中注册到EventSystem的话,对象传到DBServer就也会注册,因此这种需求不能 自动化,必须让开发者手动调用。