Static ReadonlypropertyContains mapping for a suffix used by property paths used for curve identifiers, to their index and type.
Activates or deactivates the component.
The returned active state also accounts for the active state of the parent SceneObject.
Returns the total number of animation clips influencing this animation.
Determines the default clip to play as soon as the component is enabled. If more control over playing clips is needed use the play(), blend() and crossFade() methods to queue clips for playback manually, and setState() method for modify their states individually.
Determines the default clip to play as soon as the component is enabled. If more control over playing clips is needed use the play(), blend() and crossFade() methods to queue clips for playback manually, and setState() method for modify their states individually.
Determines the default clip to play as soon as the component is enabled. If more control over playing clips is needed use the play(), blend() and crossFade() methods to queue clips for playback manually, and setState() method for modify their states individually.
Various flags set on the component that affect it's behavior.
Determines whether the component itself is active, without accounting for the active state of the parent scene object.
Determines if the object has been destroyed.
Enables or disables culling of the animation when out of view. Culled animation will not be evaluated.
Checks if any animation clips are currently playing.
Determines if the component is currently active, enabled and running.
Determines should animation bounds be used for visibility determination (culling). If false the bounds of the mesh attached to the relevant CRenderable component will be used instead.
Determines the cases that will trigger the onTransformChanged event.
Returns the PhysicsScene this node is being simulated on.
Gets the primary playing clip.
Gets the primary playing clip.
The signed execution priority of the component.
Determines order of execution of this component in relation to other components, higher priorities will execute earlier.
The priority value determines the order of initialize, enable and update calls.
Valid priorities are in the range [-100...100], other priorities are reserved for internal use.
The priority should not be modified after onCreate has been called.
The default priority for user implement components is -10. BuiltInComponent have a default priority of 0. However, instances that have dependencies or are a dependency to another component might have non zero default priorities. For example, the Camera component has a default priority of 50 as other components may depend on the camera being initialized early. The RigidBody component has a default priority of 22 and Joint components have a priority of 20 as the joint depends on fully initialized rigid bodies.
Returns the SceneInstance this node is attached to.
Returns the SceneObject this component is attached to.
Determines the speed for all animations and all layers. The default value is 1.0f. Use negative values to play-back in reverse.
Sets the wrap mode for all active animations and all layers.
Blend multiple animation clips between each other using linear interpolation.
Information about the clips to blend. Clip positions must be sorted from lowest to highest.
Parameter that controls the blending. Range depends on the positions of the provided animation clips.
Optionallayer: AnimationLayerThe layer to play the blend on. Pass null to play the clip on the main layer.
Blend four animation clips between each other using bilinear interpolation.
Information about the clips to blend.
Parameter that controls the blending, in range [(0, 0), (1, 1)]. t = (0, 0) means top left animation has full influence, t = (1, 0) means top right animation has full influence, t = (0, 1) means bottom left animation has full influence, t = (1,
Optionallayer: AnimationLayerThe layer to play the blend on. Pass null to play the clip on the main layer.
Plays the specified animation clip on top of the animation currently playing in the main layer. Multiple such clips can be playing at once, as long as you ensure each is given its own layer. Each animation can also have a weight that determines how much it influences the main animation.
Clip to additively blend. Must contain additive animation curves.
Determines how much of an effect will the blended animation have on the final output. In range [0, 1].
OptionalfadeLength: numberApplies the blend over a specified time period, increasing the weight as the time passes. Set to zero to blend immediately. In seconds.
Optionallayer: AnimationLayerLayer to play the clip in. Multiple additive clips can be playing at once in separate layers and each layer has its own weight.
Blend multiple animation clips together to form character locomotion.
Information about the clips to blend.
Controls the forward/backward movement of the player in range [-1 ... 1]. Pass 1 for forward, 0 for idle, -1 for backward.
Controls the left/right movement of the player in range [-1...1]. Pass 1 for left, 0 for idle, -1 for right.
Optionallayer: AnimationLayerThe layer to play the blend on. Pass null to play the clip on the main layer.
Creates a new layer to be used with this animation.
Fades the specified animation clip in, while fading other playing animation out, over the specified time period.
Clip to fade in.
Determines the time period over which the fade occurs. In seconds.
Optionallayer: AnimationLayerThe layer to play the blend on. Pass null to play the clip on the main layer.
true if the animation was started.
Destroys the component, removing it from its scene object and stopping component updates.
Optionalimmediate: booleanIf true the component will be fully destroyed immediately. This means that objects that are still referencing this component might fail. Normally destruction is delayed until the end of the frame to give other objects a chance to stop using it.
Allows the to play an animation clip in the editor when no scene is simulating. This form of animation playback is limited as you have no control over clip properties, and features like blending, cross fade or animation events are not supported.
Animation clip to play.
Time to start playing at, in seconds.
Optionalfreeze: booleanIf true, only the frame at the specified time will be shown, without advancing the animation.
It is required to manually call updateFloatProperties in order to apply evaluated animation data to relevant float properties where necessary.
If internal curves change, call refreshClipMappings whenever the curves internal to the animation clip change. This should be called before the call toupdateFloatProperties.
Returns one of the animation clips influencing this animation.
Animation clip at the specified index, or null if the index is out of range.
Gets the latest available evaluated local pose for the specified bone.
If uint32_t: The index of the bone to get the pose for
If String: The index of the bone to get the pose for
The local transform of the specified bone if successful or null if not
Attempts to retrieve the latest available evaluated pose from the AnimationManager. The number of transforms coincides with
the number of bones on the Skeleton when the animation was evaluated.
The pose data, or an empty optional if no pose data was found.
The pose currently only includes skeleton poses. If the animation is not using a Skeleton the method will return false.
Gets an empty or idle layer.
The first empty or idle layer found.
Retrieves an evaluated value for a generic curve with the specified index.
The curve index referencing a set of curves from the first playing animation clip. Generic curves from all other clips are ignored.
Value of the generic curve. Only valid if the method return true if the value was retrieved successfully. The method might fail if animation update didn't yet have a chance to execute and values are not yet available, or if the animation clip changed since the last frame (the last problem can be avoided by ensuring to read the curve values before changing the clip).
Gets the current weight of a single morph channel, determining how much of it to apply on top of the base mesh.
Name of the morph channel to modify. This depends on the mesh the animation is currently animating.
Morph channel weight.
Gets the current playback time for the specified clip on the layer. If no clip is specified, the time of the first clip
is returned.
The animation layer.
The AnimationClip to retrieve the information for.
The (wrapped) playback time for the clip or layer. If no clip is playing, -1 is returned.
Retrieves detailed information about a currently playing animation clip.
Clip to retrieve the information for.
Animation clip state containing the requested information or null if the clip is not found.
Checks if the component has a specific ComponentFlag bit flag set.
The flag to check.
ProtectedonProtectedonProtectedonVirtualCalled every time a component is placed into the Stopped state.
This method may be called during component destruction, if the component wasn't already in ScenePlayState.Stopped state during destruction. When called during destruction, it is called before onDestroy.
ProtectedonVirtualCalled every time a component leaves the ScenePlayState.Stopped state.
This method might be called during component creation, if the requirements for leaving the stopped state are met. One such case would be a component class that has the runInEditor attribute. When called during creation it is called after onInitialize.
Called at fixed time intervals (e.g. 60 times per frame). Only called if the component is in ScenePlayState.Playing state.
ProtectedonVirtualCalled once when the component first leaves the ScenePlayState.Stopped state.
This method might be called during component creation, if the requirements for leaving the stopped state are met. One such case would be a component class that has the runInEditor attribute. When called during creation it is called after onCreate.
VirtualCalled once per frame, after all other components received their onUpdate invocation. Only called if the component is in ScenePlayState.Playing state.
This method should only be implemented if your component needs logic that implements on other component or SceneObject changes performend in onUpdate. An example could be a camera controller logic that updates in response to changes to the object that is being tracked.
ProtectedonVirtualCalled when the script domain has been refreshed or when the component is initialized. During initialization it is called after onInitialize but before onEnable.
ProtectedonVirtualCalled when the component's parent SceneObject has changed.
The transform flags.
This method is only called if TransformChangedFlag.Transform is set on the Component.notifyFlags. The method will also not be called if the component is currently in the ScenePlayState.Stopped state.
To get the event for editor components that are active outside the simulation, attach the runInEditor attribute to your component class.
VirtualCalled once per frame. Only called if the component is in ScenePlayState.Playing state.
Moves the layer to be right below the beforeLayer.
True upon success.
Moves the layer to the top.
True upon success.
Pauses the specified animation clip.
Clip to pause.
true if the clip was modified.
The clips must first be queued with a call to play.
Pauses the all animation clips on the specified layer.
Layer to pause.
The number of clips modified.
Plays the specified animation clip.
Clip to pause.
Optionallayer: AnimationLayerLayer to play the clip in. Pass null to play the clip on the main layer. Multiple clips can be playing at once in separate
layers and each layer can be blended together.
Rebuilds internal curve -> property mapping about the primary playing animation clip. This mapping allows the animation component to know which property to assign which values from an animation curve. This should be called whenever playback for a new clip starts, or when clip curves change.
Removes the specified layer from this animation.
Samples an animation clip at the specified time, displaying only that particular frame without further playback.
Animation clip to sample.
Time to sample the clip at.
Optionallayer: AnimationLayerSets or unsets the specified ComponentFlag bit flag on the instance.
The flag to set.
True to set the flag.
Sets the target overrides for inverse kinematics.
The target overrides to use for inverse kinematics.
Changes a weight of a single morph channel, determining how much of it to apply on top of the base mesh.
Name of the morph channel to modify. This depends on the mesh the animation is currently animating.
Weight that determines how much of the channel to apply to the mesh, in range [0, 1].
Sets the current playback time for the specified clip on the layer. If no clip is specified, all clips on the layer
will be set to the specified time.
The animation layer.
The AnimationClip to retrieve the information for.
The playback time.
True upon success.
Sets the primary playing clip. The component must be in play state or this method will fail.
The clip to assign as primary clip. Must be currently playing.
Optionallayer: AnimationLayerThe clip must be playing on the specified layer. If null, the main layer will be used.
true if the primary clip was set
Determines the speed for all animations on the specified layer.
Changes the state of a playing animation clip. If the animation clip is currently not playing the playback is started for the clip.
Clip to change the state for.
New state of the animation (e.g. changing the time for seeking).
Registers the coroutine for the specified component using the provided args as arguments.
true if the coroutine was registered.
The coroutine will be called for the first time when the coroutine subsystem runs for update events.
There is no guarantee with regards to the order of how coroutines are invoked.
Coroutines are a great way for time-deferred or delayed system. To implement a coroutine simply add a
generator method to your component and register it as coroutine:
public *myCoroutine(text:string)
{
const endTime:number = Time.realElapsed + 3;
while(Time.realElapsed < endTime)
{
yield true;
}
Debug.log("This code will be invoked after 3 seconds with the text=" + text);
}
To register the function simply call
this.startCoroutine(this.myCoroutine, "Hello World!");
The function will be invoked once the coroutine runs. The coroutine function can yield the program
control flow by using the keyword yield. The coroutine will then stop execution at that point,
and pick up the execution in the next update event, right after the yield keyword that caused
the coroutine to pause.
With helper functions such as waitForSeconds or waitForAsyncOp it is easy to create coroutines that pause for a set time interval.
Registers the coroutine for the specified component using the provided args as arguments.
true if the coroutine was registered.
The coroutine will be called for the first time when the coroutine subsystem runs for fixedUpdate events.
There is no guarantee with regards to the order of how coroutines are invoked.
Coroutines are a great way for time-deferred or delayed system. To implement a coroutine simply add a
generator method to your component and register it as coroutine:
public *myCoroutine(text:string)
{
const endTime:number = Time.realElapsed + 3;
while(Time.realElapsed < endTime)
{
yield true;
}
Debug.log("This code will be invoked after 3 seconds!");
}
To register the function simply call
this.startCoroutine(this.myCoroutine, "Hello World!");
The function will be invoked once the coroutine runs. The coroutine function can yield the program
control flow by using the keyword yield. The coroutine will then stop execution at that point,
and pick up the execution in the next fixedUpdate event, right after the yield keyword that caused
the coroutine to pause.
With helper functions such as waitForSeconds or waitForAsyncOp it is easy to create coroutines that pause for a set time interval.
Stops playing all animations on the provided layer. Specify -1 to stop animation on the main layer (non-additive animations).
Optionallayer: AnimationLayerStops the coroutine for the specified component.
The coroutine to stop.
true if the coroutine was registered.
Preview mode allows certain operations on the component to be allowed (like basic animation playback), even when the component is not actively running. This is intended for use primarily by the animation editor. Preview mode ends automatically when the component is enabled (i.e. starts running normally), or when explicitly disabled. Returns true if the preview mode was enabled (which could fail if the component is currently running).
StaticfindSearches the scene object hierarchy to find a property at the given path.
Root scene object to which the path is relative to.
Path to the property, where each element of the path is separated with "/".
Path elements prefixed with "!" signify names of child scene objects (first one relative to
`root`. Name of the root element should not be included in the path.
Path element prefixed with ":" signify names of components. If a path doesn't have a
component element, it is assumed the field is relative to the scene object itself (only
"position", "rotation" and "scale" fields are supported in such case). Only one component
path element per path is allowed.
Path entries with no prefix are considered regular interop object fields. Each path must have
at least one such entry.
A field path can be followed by an indexer [n] where n is a zero-based index. Such paths
are assumed to be referencing an index within an array or a list.
A field path can also be followed by a suffix (after the indexer, if any) separated from the
path name with ".". This suffix is not parsed internally, but will be returned as
`suffix`.
Path examples:
:MyComponent/myInt (path to myInt variable on a component attached to the root object)
:MyComponent/myArray[0] (path to first element of myArray on the same component as above)
!childSO/:MyComponent/myInt (path to myInt variable on a child scene object)
!childSO/position (path to the scene object position)
:MyComponent/myVector.z (path to the z component of myVector on the root object)
OptionalgenericCurvesOnly: booleanReturn properties for generic animation curvers.
Object.
If found, an object you can use for setting and getting the value from the property.
Suffix of the last field entry, if it has any. Contains the suffix separator ".".
StaticgetLocates a rsx object by its sceneRuntimeID and UUID.
The runtime ID of the SceneInstance of the object.
The UUID of the object to retrieve.
The object or null if no object with given sceneRuntimeID and uuid has been registered
Handles animation playback. Takes one or multiple animation clips as input and evaluates them every animation update tick depending on set properties. The evaluated data is used by the core thread for skeletal animation, by the sim thread for updating attached scene objects and bones (if skeleton is attached), or the data is made available for manual queries in the case of generic animation.