Table of Contents

Class EntityExtensions

Namespace
Stride.Engine
Assembly
Stride.Engine.dll

Extensions for Entity

public static class EntityExtensions
Inheritance
EntityExtensions

Methods

Clone(Entity)

Deep clone of this entity.

public static Entity Clone(this Entity entity)

Parameters

entity Entity

The entity to clone

Returns

Entity

The cloned entity

EnableAll(Entity, bool, bool)

Enables or disables all ActivableEntityComponent.

public static void EnableAll(this Entity entity, bool enabled = true, bool applyOnChildren = false)

Parameters

entity Entity

The entity to apply this method.

enabled bool

If set to true, all ActivableEntityComponent will be enabled; otherwise they will be disabled

applyOnChildren bool

Recursively apply this method to the children of this entity

Enable<T>(Entity, bool, bool)

Enables or disables components of the specified type.

public static void Enable<T>(this Entity entity, bool enabled = true, bool applyOnChildren = false) where T : ActivableEntityComponent

Parameters

entity Entity

The entity to apply this method.

enabled bool

If set to true, all components of {T} will be enabled; otherwise they will be disabled

applyOnChildren bool

Recursively apply this method to the children of this entity

Type Parameters

T

Type of the component

GetChildren(Entity)

Gets the children of this entity.

public static IEnumerable<Entity> GetChildren(this Entity entity)

Parameters

entity Entity

The entity

Returns

IEnumerable<Entity>

An iteration on the child entity