EntityExtensions Class
Namespace: Stride.EngineAssembly: Stride.Engine.dll
Extensions for Entity
public static class EntityExtensions
              | Name | Description | |
|---|---|---|
| Methods | ||
| Clone(Entity) | Deep clone of this entity.  | 
                          |
| Enable<T>(Entity, Boolean, Boolean) | Enables or disables components of the specified type.  | 
                          |
| EnableAll(Entity, Boolean, Boolean) | Enables or disables all ActivableEntityComponent.  | 
                          |
| GetChildren(Entity) | Gets the children of this entity.  | 
                          |
Methods
Clone(Entity)
Deep clone of this entity.
public static Entity Clone(this Entity entity)
              Parameters
| Type | Name | Description | 
|---|---|---|
| Entity | entity | The entity to clone  | 
                  
Returns
| Type | Description | 
|---|---|
| Entity | The cloned entity  | 
                  
Enable<T>(Entity, Boolean, Boolean)
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
| Type | Name | Description | 
|---|---|---|
| Entity | entity | The entity to apply this method.  | 
                  
| System.Boolean | enabled | If set to   | 
                  
| System.Boolean | applyOnChildren | Recursively apply this method to the children of this entity  | 
                  
Type Parameters
| Name | Description | 
|---|---|
| T | Type of the component  | 
                  
EnableAll(Entity, Boolean, Boolean)
Enables or disables all ActivableEntityComponent.
public static void EnableAll(this Entity entity, bool enabled = true, bool applyOnChildren = false)
              Parameters
| Type | Name | Description | 
|---|---|---|
| Entity | entity | The entity to apply this method.  | 
                  
| System.Boolean | enabled | If set to   | 
                  
| System.Boolean | applyOnChildren | Recursively apply this method to the children of this entity  | 
                  
GetChildren(Entity)
Gets the children of this entity.
public static IEnumerable<Entity> GetChildren(this Entity entity)
              Parameters
| Type | Name | Description | 
|---|---|---|
| Entity | entity | The entity  | 
                  
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<Entity> | An iteration on the child entity  |