Unravel Engine C# Reference
Loading...
Searching...
No Matches
Unravel.Core.Component Class Referenceabstract

Represents a base class for all components in the entity-component system. More...

Inheritance diagram for Unravel.Core.Component:
Unravel.Core.NativeObject Unravel.Core.AnimationComponent Unravel.Core.AudioListenerComponent Unravel.Core.AudioSourceComponent Unravel.Core.BoneComponent Unravel.Core.CameraComponent Unravel.Core.IdComponent Unravel.Core.LightComponent Unravel.Core.ModelComponent Unravel.Core.PhysicsComponent Unravel.Core.ReflectionProbeComponent Unravel.Core.ScriptComponent Unravel.Core.TextComponent Unravel.Core.TransformComponent Unravel.Core.UIDocumentComponent

Public Member Functions

override bool IsValid ()
 Determines whether this component is valid.
 
- Public Member Functions inherited from Unravel.Core.NativeObject
bool IsValid ()
 
bool Equals (NativeObject other)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Properties

Entity owner [get, set]
 Gets the entity that owns this component.
 
TransformComponent transform [get]
 Gets the TransformComponent associated with this component's owner.
 

Additional Inherited Members

- Static Public Member Functions inherited from Unravel.Core.NativeObject
static bool operator== (NativeObject left, NativeObject right)
 
static bool operator!= (NativeObject left, NativeObject right)
 

Detailed Description

Represents a base class for all components in the entity-component system.

Definition at line 9 of file Components.cs.

Member Function Documentation

◆ IsValid()

override bool Unravel.Core.Component.IsValid ( )

Determines whether this component is valid.

Returns
true if the owner entity is valid and this component exists on the owner; otherwise, false.

Definition at line 46 of file Components.cs.

Property Documentation

◆ owner

Entity Unravel.Core.Component.owner
getset

Gets the entity that owns this component.

Definition at line 14 of file Components.cs.

◆ transform

TransformComponent Unravel.Core.Component.transform
get

Gets the TransformComponent associated with this component's owner.

The transform is lazily loaded and cached for performance. The cache is updated if the owner entity is reassigned.

Definition at line 26 of file Components.cs.


The documentation for this class was generated from the following file: