"Unity DOTS ECS from entry to real fragrance" (4) starting from rotating a Cube (Part 2)

1. Create an entity (Entity). Entity is essentially an ID, which organizes Components together like a container.

1. There is an EntityManager class in ECS to manage all entities in a World. An Entity can be created at runtime using EntityManager.CreateEntity(). But here we will demonstrate how to convert Game Object to Entity directly under the editor.

2. First create a common Cube GameObject.

insert image description here
Add the component Convert To Entity provided by ECS to the Cube. The function of this component is to convert the traditional Game Object into an Entity entity. When running, we will find that the Cube GameObject disappears

Guess you like

Origin blog.csdn.net/cxihu/article/details/120631111