Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    EntityExtensions Class

    Namespace: Stride.Engine
    Assembly: Stride.Engine.dll

    Extensions for Entity

    System.Object → EntityExtensions
    Derived from EntityExtensions:

    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.

    | Improve this Doc View Source

    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 true, all components of {T} will be enabled; otherwise they will be disabled

    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 true, all ActivableEntityComponent will be enabled; otherwise they will be disabled

    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


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation