Native Components

animation 

Examples: Animation Example

Animation playback.

ParamTypeDescription
previewBoolEnable to preview the animation in editor
retargetBoolRetarget all tracks to this object
animationAnimationAnimation to play
autoplayBoolStart playing automatically
playCountIntNumber of repetitions or 0 for infinite loop

Track Targets 

Each track in an imported animation has a target. The target is the object that is affected by the track.

Retargetting is the process of changing a track’s target to a different object.

Animation track targets are initially specified by the imported file, but often are reused for other objects. This can be done by enabling retarget on the component, which will interally duplicate the animation, but with the target of all tracks set to the component’s object.

collision 

Examples: Collision Example

Used for ray casting and overlap queries.

ParamTypeDescription
colliderEnumCollision shape: Axis-Aligned Box, Box or Sphere
radiusFloatFor spheres: the sphere radius
extentsVec3For box/aabb: the box half-extents
groupsBool[]/IntArray of groups of which the object should be part of

input 

Set the object’s transformation to WebXR Device API input. This can be a VR controller or VR/AR headset.

When no input is present (e.g. no controller on the users system or controller not trackable), the component will set the position of the object to the last known input. If no input was known, the transformation is set to the identity (location at origin, no rotation). Set the component inactive to avoid the transformation to be set.

ParamTypeDescription
typeEnumInput type

light 

Light source.

ParamTypeDescription
typeEnumPoint (punctual) or Sun (directional)
colorColorLight color
attenuationFloatLight attenuation

mesh 

Examples: Skinning Example

Renders a mesh with given material and an optional skin.

ParamTypeDescription
meshMeshMesh to render
skinSkinSkin to render. Appears if mesh has skin properties (joint ids and weights).
materialMaterialMaterial to render with.

text 

Examples: Text Example

Renders a string with the project-wide font and a material.

The material should use the DistanceFieldVector Textured shader and DefaultFont texture, otherwise rendered results might be unexpected.

ParamTypeDescription
alignmentEnumHorizontal text alignment
justificationEnumVertical text justification
textStringText to be displayed
materialMaterialMaterial to render with, should use the DistanceFieldVector Textured shader.

view 

A virtual camera.

To set left/right eye views for VR, set corresponding objects in “Project Settings” > “VR”.

ParamTypeDescription
fovFloatVertical field of view
nearFloatDistance to the near clipping plane (closest render distance)
farFloatDistance to the far clipping plane (farthest render distance)