Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    EntityComponent Class

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

    Base class for Entity components.

    System.Object → EntityComponent
    Derived from EntityComponent: ActivableEntityComponent AnimationComponent LightProbeComponent ModelNodeLinkComponent ScriptComponent TransformComponent UIElementLinkComponent NavigationBoundingBoxComponent NavigationComponent

    [DataSerializer(typeof(EntityComponent.Serializer))]
    [DataContract(Inherited = true)]
    [ComponentCategory("Miscellaneous")]
    public abstract class EntityComponent : IIdentifiable
    Name Description
    Properties
    EnsureEntity

    Gets the entity and throws an exception if the entity is null.

    Entity

    Gets or sets the owner entity.

    Id

    The unique identifier of this component.

    | Improve this Doc View Source

    Properties


    EnsureEntity

    Gets the entity and throws an exception if the entity is null.

    protected Entity EnsureEntity { get; }
    Property Value
    Type Description
    Entity

    The entity.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Entity on this instance is null


    Entity

    Gets or sets the owner entity.

    public Entity Entity { get; }
    Property Value
    Type Description
    Entity

    The owner entity.


    Id

    The unique identifier of this component.

    [DataMember(-2147483648)]
    [Display(null, null, Browsable = false)]
    public Guid Id { get; set; }
    Property Value
    Type Description
    System.Guid

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

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