Collect all Animations/Animators automatically on export and emit them as playing at the start. Animator state chains and loops will automatically be collected and exported in order as well. If this setting is off, Animators need to be registered by components – for example from PlayAnimationOnClick.
Collect all AudioSources automatically on export and emit them as playing at the start. They will loop according to their settings. If this setting is off, Audio Sources need to be registered by components – for example from PlayAudioOnClick.
Extensions to add custom behaviors and interactions to the USDZ file.
You can add your own extensions here by extending IUSDExporterExtension.
the object this component is attached to. Note that this is a threejs Object3D with some additional features
the unique identifier for this component
Enabling this option will export QuickLook-specific preliminary behaviours along with the USDZ files. These extensions are only supported on QuickLook on iOS/visionOS/MacOS. Keep this option off for general USDZ usage.
Assign the object to export as USDZ file. If undefined or null, the whole scene will be exported.
Enabling this option will export the USDZ file with RealityKit physics components. Rigidbody and Collider components will be converted to their RealityKit counterparts. Physics are supported on QuickLook in iOS 18+ and VisionOS 1+. Physics export is automatically turned off when there are no Rigidbody components anywhere on the exported object.
Optional
sourceholds the source identifier this object was created with/from (e.g. if it was part of a glTF file the sourceId holds the url to the glTF)
true if the object is enabled and active in the hierarchy
true if this component was destroyed (this.destroy()
) or the whole object this component was part of
Forward (0,0,-1) vector in world space
the layer of the gameObject this component is attached to
the name of the gameObject this component is attached to
Right (1,0,0) vector in world space
shorthand for this.context.scene
the scene of the context
Is the gameObject marked as static
the tag of the gameObject this component is attached to
Up (0,1,0) vector in world space
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
called once when the component becomes active for the first time (once per component)
This is the first callback to be called
Destroys this component (and removes it from the object)
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Downloads the given blob as a file.
Optional
earlyfirst callback in a frame (called every frame when implemented)
Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook.
a Promise
Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook.
a Promise
Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook. Use the various public properties of USDZExporter to customize export behaviour.
use exportAndOpen instead
Optional
latelate callback in a frame (called every frame when implemented)
Optional
oncalled after the scene was rendered
Optional
oncalled before the scene gets rendered in the main update loop
Optional
onCalled before the XR session is requested. Use this callback if you want to modify the session init features
Optional
onOptional
onOptional
onCalled when the component gets destroyed
Optional
onCallback when this component joins a xr session (or becomes active in a running XR session)
Optional
onCallback when this component exists a xr session (or when it becomes inactive in a running XR session)
Optional
onCalled for all scripts when the context gets paused or unpaused
Optional
onCalled when an object (or any child object) is clicked (needs a EventSystem in the scene)
Optional
onCalled when a button is started to being pressed on an object (or a child object)
Optional
onCalled when a pointer (mouse, touch, xr controller) starts pointing on/hovering an object (or a child object)
Optional
onCalled when a pointer (mouse, touch, xr controller) exists an object (it was hovering the object before but now it's not anymore)
Optional
onCalled when a pointer (mouse, touch, xr controller) is moving over an object (or a child object)
Optional
onCalled when a button is released (which was previously pressed in onPointerDown
)
Optional
onOptional
onOptional
onOptional
onCallback when a xr session updates (while it is still active in XR session)
Optional
oncalled when you decorate fields with the @validate() decorator
Optional
prop: stringthe name of the field that was changed
Optional
onXRControllerCallback when a controller is connected/added while in a XR session
OR when the component joins a running XR session that has already connected controllers
OR when the component becomes active during a running XR session that has already connected controllers
Optional
onXRControllercallback when a controller is removed while in a XR session
OR when the component becomes inactive during a running XR session
Opens QuickLook on iOS/iPadOS/visionOS with the given content in AR mode.
The URL to the .usdz or .reality file or a blob containing an USDZ file.
Download filename
Removes the event listener in target's event listener list with the same type, callback, and options.
Optional
resolvecalled on a component with a map of old to new guids (e.g. when instantiate generated new guids and e.g. timeline track bindings needs to remape them)
starts a coroutine (javascript generator function)
yield
will wait for the next frame:
yield WaitForSeconds(1)
to wait for 1 second.yield WaitForFrames(10)
to wait for 10 frames.yield new Promise(...)
to wait for a promise to resolve.generator function to start
event to register the coroutine for (default: FrameEvent.Update). Note that all coroutine FrameEvent callbacks are invoked after the matching regular component callbacks. For example FrameEvent.Update
will be called after regular component update()
methods)
the generator function (use it to stop the coroutine with stopCoroutine
)
Stop a coroutine that was previously started with startCoroutine
the routine to be stopped
the frame event to unregister the routine from (default: FrameEvent.Update)
Optional
supportsXROptional callback, you can implement this to only get callbacks for VR or AR sessions if necessary.
true if the mode is supported (if false the mode is not supported by this component and it will not receive XR callbacks for this mode)
Optional
updateregular callback in a frame (called every frame when implemented)
Exports the current scene or a specific object as USDZ file and opens it in QuickLook on iOS/iPadOS/visionOS.
The USDZ file is generated using the Needle Engine ThreeUSDZExporter.
The exporter supports various extensions to add custom behaviors and interactions to the USDZ file.
The exporter can automatically collect Animations and AudioSources and export them as playing at the start.
The exporter can also add a custom QuickLook overlay with a call to action button and custom branding.
Example