Search Results for

    Show / Hide Table of Contents

    Class Component

    Provides logic and functionality to an Entity.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    BackgroundImage
    Billboard
    EnvironmentComponent
    MaterialComponent
    ShadowMapComponent
    GazeCollision
    GazeIndicator
    GazeStabilizer
    SpatialSurface
    XRDeviceRenderableModel
    XRImageTracking
    XRPassthroughLayerComponent
    XRPassthroughSurfaceMeshComponent
    XRPlaneRenderer
    Behavior
    Drawable
    ErrorComponent
    BaseModel
    Camera
    LODEntry
    LODGroup
    Light
    ParticlesSceneComponent
    SunComponent
    Transform3D
    ParticlesComponent
    BaseForce
    Collider3D
    Joint3D<T, K>
    PhysicVehicle3D
    PhysicWheel3D
    NetworkCustomPropertiesProvider
    NetworkPropertySync<K, V>
    Implements
    IDependencyObject
    Inherited Members
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Framework
    Assembly: Evergine.Framework.dll
    Syntax
    public abstract class Component : PrefabInstanceObject, IDependencyObject
    Remarks

    A Component should 1) solve just a single problem (provide a position, render a mesh, hold a mesh, ...) and 2) depend on other Component instances to provide more complex behaviors.

    For implementers

    • The method Initialize allows you to perform custom logic when a Component is initialized.
    • The method ResolveDependencies is used to make sure the component has all the dependencies it needs to work.

    Recipes and samples.

    • [Component based Architecture recipe](../recipes/Basic/Component-based-Architecture.md)

    Properties

    Managers

    Gets the scene managers collection.

    Declaration
    public SceneManagers Managers { get; }
    Property Value
    Type Description
    SceneManagers

    Owner

    Gets the owner Entity of this instance. It provides a path to climb through the entity's hierarchy.

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

    The owner Entity.

    ShouldBeActivated

    Gets a value indicating whether this object should be activated.

    Declaration
    protected override bool ShouldBeActivated { get; }
    Property Value
    Type Description
    bool
    Overrides
    AttachableObject.ShouldBeActivated

    Methods

    Attach(Entity)

    Attach this component to an entity.

    Declaration
    public bool Attach(Entity owner)
    Parameters
    Type Name Description
    Entity owner

    The entity owner.

    Returns
    Type Description
    bool

    True if the attach is correct.

    Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    public virtual Component Clone()
    Returns
    Type Description
    Component

    A new object that is a copy of this instance.

    OnActivated()

    Invoked when the object is activated once is attached.

    Declaration
    protected override void OnActivated()
    Overrides
    AttachableObject.OnActivated()

    OnAttached()

    Invoked when the object is attached to the system.

    Declaration
    protected override bool OnAttached()
    Returns
    Type Description
    bool

    True if all is OK.

    Overrides
    AttachableObject.OnAttached()

    OnDeactivated()

    Invoked when the object is deactivated.

    Declaration
    protected override void OnDeactivated()
    Overrides
    AttachableObject.OnDeactivated()

    OnDestroy()

    Invoked when the object is going to be disposed.

    Declaration
    protected override void OnDestroy()
    Overrides
    AttachableObject.OnDestroy()

    OnDetach()

    Invoked when the object is detached.

    Declaration
    protected override void OnDetach()
    Overrides
    AttachableObject.OnDetach()

    OnLoaded()

    Invoked when the object is loaded.

    Declaration
    protected override void OnLoaded()
    Overrides
    AttachableObject.OnLoaded()

    Start()

    Invoked to start the object.

    Declaration
    protected override void Start()
    Overrides
    AttachableObject.Start()

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX