Creates a new Entity instance.
The unique identifier for this entity
Whether this entity is alive or not
Optional
components: Map<number, Component>Optional map of existing components to initialize with
Protected
__componentsThe Map of components. All components must be managed in this map
No use yet
Collection of tags associated with this object
Static
Readonly
InvalidInvalid object UID constant
Static
currentCurrent maximum object count for UID generation
Static
Readonly
invalidInvalid Entity UID constant value
Gets the unique identifier of this entity.
The entity's unique ID
Gets the unique object identifier
The object's UID
Gets the unique name of this object
The unique name string
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Retrieves a component of the specified type from this entity.
The constructor/class of the component to retrieve
The component instance if found, undefined if the entity doesn't have this component type
Checks whether this entity has a component of the specified type.
The constructor/class of the component to check for
True if the entity has a component of the specified type, false otherwise
Checks if this object has all the specified tags with exactly matching values
Object containing tag names as keys and expected values
True if all specified tags exist with matching values, false otherwise
Checks if the object's combined tag string contains all the provided search strings. This allows for flexible searching within tag names and values.
Array of strings that must all be present in the combined tag string
True if all strings are found in the combined tag string, false otherwise
Attempts to retrieve the AnimationComponent from this entity.
The AnimationComponent if this entity has one, undefined otherwise
Attempts to retrieve the BlendShapeComponent from this entity.
The BlendShapeComponent if this entity has one, undefined otherwise
Attempts to retrieve the CameraComponent from this entity.
The CameraComponent if this entity has one, undefined otherwise
Attempts to retrieve the CameraControllerComponent from this entity.
The CameraControllerComponent if this entity has one, undefined otherwise
Attempts to retrieve the EffekseerComponent from this entity.
The EffekseerComponent if this entity has one, undefined otherwise
Attempts to retrieve the LightComponent from this entity.
The LightComponent if this entity has one, undefined otherwise
Attempts to retrieve the MeshComponent from this entity.
The MeshComponent if this entity has one, undefined otherwise
Attempts to retrieve the MeshRendererComponent from this entity.
The MeshRendererComponent if this entity has one, undefined otherwise
Attempts to retrieve the PhysicsComponent from this entity.
The PhysicsComponent if this entity has one, undefined otherwise
Attempts to retrieve the SceneGraphComponent from this entity.
The SceneGraphComponent if this entity has one, undefined otherwise
Attempts to retrieve the SkeletalComponent from this entity.
The SkeletalComponent if this entity has one, undefined otherwise
Attempts to retrieve the TransformComponent from this entity.
The TransformComponent if this entity has one, undefined otherwise
Attempts to retrieve the VrmComponent from this entity.
The VrmComponent if this entity has one, undefined otherwise
Attempts to set a tag on this object. If the tag already exists, it will be replaced.
The tag object containing the name and value to set
True if the tag was successfully set, false if the tag name contains invalid characters
Attempts to set a unique name for this object
The desired unique name
If true, appends UID to make name unique when conflicts occur; if false, fails on conflict
True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false
Static
_resetStatic
getStatic
getStatic
searchSearches for the first object that has a specific tag with the given value
The tag name to search for
The tag value to match
WeakRef to the first matching object, or undefined if not found
The class that represents an entity.
Remarks
The Rhodonite Entity Class which are an entities that exists in space. Entities can acquire various functions by having components on themselves.