Table of Contents

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

parent Entity

The 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

T

The tag component type.

With<T>(T)

Adds a component to the entity being built.

IEntityBuilder With<T>(T component) where T : struct, IComponent

Parameters

component T

The component data.

Returns

IEntityBuilder

This builder for chaining.

Type Parameters

T

The component type.