Click or drag to resize
EntityManagerExtensionsCreateEntity Method
Creates a new entity, adding components matching the passed blueprint and initializing these with the data stored in the blueprint and the specified configuration. Configuration data is preferred over blueprint data.

Namespace: Slash.ECS.Blueprints.Extensions
Assembly: Slash.ECS.Blueprints (in Slash.ECS.Blueprints.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int CreateEntity(
	this EntityManager entityManager,
	Blueprint blueprint,
	IAttributeTable configuration = null,
	List<Type> additionalComponents = null
)

Parameters

entityManager
Type: Slash.ECS.ComponentsEntityManager
Entity Manager to add entity to.
blueprint
Type: Slash.ECS.BlueprintsBlueprint
Blueprint describing the entity to create.
configuration (Optional)
Type: Slash.Collections.AttributeTablesIAttributeTable
Data for initializing the entity.
additionalComponents (Optional)
Type: System.Collections.GenericListType
Components to add to the entity, in addition to the ones specified by the blueprint.

Return Value

Type: Int32
Unique id of the new entity.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type EntityManager. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also