Optional
_interactorIf disabled, the Component will stop enacting its behavior.
Called whenever the cursor changes enabled state (showing / hiding the cursor visual)
Readonly
sceneThe scene object this component is on.
Readonly
uniqueSet the CursorMode of the cursor to change the visual To return the cursor to its default StateMachine logic, use CursorMode.Auto
the new mode of the cursor visual
Get the world position of this interactor's cursor visual
vec3 of the worldPosition
Set the world position of this interactor's cursor visual
vec3 of the worldPosition, null to revert to default behavior to follow raycast
Set the Texture of the cursor when using the CursorMode.Custom mode Must explicitly set the CursorMode to CursorMode.Custom before the texture appears.
the custom texture (typically cached via requireAsset(.../assetName.png) as Texture) to use
Set the render order of the cursor visual.
Adds a new SceneEvent, triggered by eventType
events, to the ScriptComponent.
Returns the SceneObject the component is attached to.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Removes a previously added SceneEvent from the ScriptComponent.
Static
get
Binds scripts to Events and executes them when triggered. Any script can access the ScriptComponent executing them through the variable
script
. See also: Scripting Overview, Script Events Guide.Example