EntityWorld.CreateEntity Method
Definition¶
Namespace: Brine2D.ECS
| Overloads | |
|---|---|
| CreateEntity(string) | Creates a new entity and queues it for initialization. |
| CreateEntity<T>(string) | Creates a new entity and queues it for initialization. |
EntityWorld.CreateEntity(string) Method¶
Creates a new entity and queues it for initialization.
public Brine2D.ECS.Entity CreateEntity(string name="");
Parameters¶
name System.String
Implements CreateEntity(string)
Returns¶
Remarks¶
The entity is added to the ID lookup immediately so that components and behaviors can be attached right away. It will not appear in Brine2D.ECS.EntityWorld.Entities or receive OnInitialize() until the next Brine2D.ECS.EntityWorld.ProcessDeferredOperations call.
EntityWorld.CreateEntity\<T>(string) Method¶
Creates a new entity and queues it for initialization.
public T CreateEntity<T>(string name="")
where T : Brine2D.ECS.Entity, new();
Type parameters¶
T
Parameters¶
name System.String
Implements CreateEntity<T>(string)
Returns¶
Remarks¶
The entity is added to the ID lookup immediately so that components and behaviors can be attached right away. It will not appear in Brine2D.ECS.EntityWorld.Entities or receive OnInitialize() until the next Brine2D.ECS.EntityWorld.ProcessDeferredOperations call.