 | 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.ExtensionsAssembly: Slash.ECS.Blueprints (in Slash.ECS.Blueprints.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static int CreateEntity(
this EntityManager entityManager,
Blueprint blueprint,
IAttributeTable configuration = null,
List<Type> additionalComponents = null
)
<ExtensionAttribute>
Public Shared Function CreateEntity (
entityManager As EntityManager,
blueprint As Blueprint,
Optional configuration As IAttributeTable = Nothing,
Optional additionalComponents As List(Of Type) = Nothing
) As Integer
public:
[ExtensionAttribute]
static int CreateEntity(
EntityManager^ entityManager,
Blueprint^ blueprint,
IAttributeTable^ configuration = nullptr,
List<Type^>^ additionalComponents = nullptr
)
[<ExtensionAttribute>]
static member CreateEntity :
entityManager : EntityManager *
blueprint : Blueprint *
?configuration : IAttributeTable *
?additionalComponents : List<Type>
(* Defaults:
let _configuration = defaultArg configuration null
let _additionalComponents = defaultArg additionalComponents null
*)
-> int
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