Table of Contents

Interface IEntity

Namespace
Exiled.API.Features.Core.Interfaces
Assembly
Exiled.API.dll

Defines the contract for basic ECS implementation.

public interface IEntity
Extension Methods

Properties

ComponentsInChildren

Gets a IReadOnlyCollection<T> of EActor containing all the components in children.

IReadOnlyCollection<EActor> ComponentsInChildren { get; }

Property Value

IReadOnlyCollection<EActor>

Methods

AddComponent(Type, string)

Adds a component to the IEntity.

EActor AddComponent(Type type, string name = "")

Parameters

type Type

The Type of the EActor to be added.

name string

The name of the component.

Returns

EActor

The added EActor component.

AddComponent<T>(string)

Adds a component to the IEntity.

T AddComponent<T>(string name = "") where T : EActor

Parameters

name string

The name of the component.

Returns

T

The added EActor component.

Type Parameters

T

The T EActor to be added.

AddComponent<T>(Type, string)

Adds a component from the IEntity.

T AddComponent<T>(Type type, string name = "") where T : EActor

Parameters

type Type

The Type of the EActor to be added.

name string

The name of the component.

Returns

T

The added EActor component.

Type Parameters

T

The T cast EActor type.

GetComponent(Type)

Gets a component from the IEntity.

EActor GetComponent(Type type)

Parameters

type Type

The Type of the EActor to look for.

Returns

EActor

The EActor component.

GetComponent<T>()

Gets a component from the IEntity.

T GetComponent<T>() where T : EActor

Returns

T

The EActor component.

Type Parameters

T

The T EActor to look for.

GetComponent<T>(Type)

Gets a component from the IEntity.

T GetComponent<T>(Type type) where T : EActor

Parameters

type Type

The Type of the EActor to look for.

Returns

T

The EActor component.

Type Parameters

T

The cast T EActor.

HasComponent(Type, bool)

Checks if the IEntity has an active component.

bool HasComponent(Type type, bool depthInheritance = false)

Parameters

type Type

The EActor to look for.

depthInheritance bool

A value indicating whether subclasses should be considered.

Returns

bool

true if the component was found; otherwise, false.

HasComponent<T>(bool)

Checks if the IEntity has an active component.

bool HasComponent<T>(bool depthInheritance = false)

Parameters

depthInheritance bool

A value indicating whether subclasses should be considered.

Returns

bool

true if the component was found; otherwise, false.

Type Parameters

T

The EActor to look for.

TryGetComponent(Type, out EActor)

Tries to get a component from the IEntity.

bool TryGetComponent(Type type, out EActor component)

Parameters

type Type

The Type of the EActor to get.

component EActor

The found component.

Returns

bool

true if the component was found; otherwise, false.

TryGetComponent<T>(Type, out T)

Tries to get a component from the IEntity.

bool TryGetComponent<T>(Type type, out T component) where T : EActor

Parameters

type Type

The Type of the EActor to get.

component T

The found component.

Returns

bool

true if the component was found; otherwise, false.

Type Parameters

T

The cast T EActor.

TryGetComponent<T>(out T)

Tries to get a component from the IEntity.

bool TryGetComponent<T>(out T component) where T : EActor

Parameters

component T

The T EActor.

Returns

bool

true if the component was found; otherwise, false.

Type Parameters

T

The T EActor to look for.