Interface IEntityBuilder
- Namespace
- KeenEyes
- Assembly
- KeenEyes.Abstractions.dll
Interface for fluent entity builders. Implemented by EntityBuilder, PrefabBuilder, etc.
public interface IEntityBuilder
Methods
Build()
Builds the entity and adds it to the world.
Entity Build()
Returns
- Entity
The created entity.
WithParent(Entity)
Sets the parent entity for the entity being built.
IEntityBuilder WithParent(Entity parent)
Parameters
parentEntityThe parent entity.
Returns
- IEntityBuilder
This builder for chaining.
WithTag<T>()
Adds a tag component to the entity being built.
IEntityBuilder WithTag<T>() where T : struct, ITagComponent
Returns
- IEntityBuilder
This builder for chaining.
Type Parameters
TThe tag component type.
With<T>(T)
Adds a component to the entity being built.
IEntityBuilder With<T>(T component) where T : struct, IComponent
Parameters
componentTThe component data.
Returns
- IEntityBuilder
This builder for chaining.
Type Parameters
TThe component type.