EllanJiang / GameFramework

This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.
https://GameFramework.cn
MIT License
5.96k stars 1.45k forks source link

解决重复回收会抛出异常 #54

Closed jozhn closed 3 years ago

jozhn commented 3 years ago

如果在游戏逻辑中HideEntity,然后同时结束游戏,可能会同时触发两个HideEntity。

这样会导致EntityGroup中m_Entities.Remove(entity)时发生Exception,所以在WillHide时也应该不继续执行。