您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
822 B
822 B
Entity
Entity
is an ID. You can think of it as a super lightweight GameObject that does not even have a name by default.
You can add and remove components from entities at runtime. entity ID's are stable. They are the only stable way to store a reference to another component or entity.
You can add and remove components from entities at runtime in much the same way as a GameObject
. Entities can be created from Prefabs by using ComponentDataProxy
. The EntityManager
will parse the Prefab for ComponentData and add it when it creates the entity.
Iterating entities
Iterating over all entities that have a matching set of components, is at the center of the ECS architecture.