Readonly
apiGeneric object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.
Defines the interactive behavior and visual feedback style of the button:
The texture displayed on the button in its default state (not toggled). Applied to idle, hover, and pinched materials.
If disabled, the Component will stop enacting its behavior.
References the blend shape on the glow mesh that will be animated during interactions. Must match an existing blend shape name in your glow mesh. This controls the shape animation of the glow effect as the button is interacted with.
The material applied to the glow mesh when a user's hand is hovering over the button.
The material applied to the glow mesh when the button is in its default state (not being interacted with).
The material applied to the glow mesh when the user is actively interacting with the button.
Optional
glowThe secondary mesh that displays the glow effect around the button. This mesh will receive its own material changes and blend shape animations independent from the main button mesh during interactions.
Controls the maximum intensity of the button's deformation effect when interacted with. This scales the weight applied to the mesh's blend shape (defined by Mesh Blend Shape Name). Higher values create more pronounced visual feedback during interactions. Range: 0.0 (no effect) to 1.0 (maximum effect).
References the blend shape on the button mesh that will be animated during interactions. Must match an existing blend shape name in your mesh. Default is "Pinch", but should be set to match a blend shape available in your mesh.
The material applied to the button when an Interactor is hovering over it.
The material applied to the button when not being interacted with (idle state).
The material applied to the button when the user is actively interacting with it.
The material applied to the State Button when a user's hand is hovering over it.
The material applied to the State Button when it's in its default state (not being interacted with).
The material applied to the State Button when it's being actively interacted with. This provides visual feedback during interaction and may remain applied after the interaction ends if persistentPinchedState is enabled.
The material applied to the button when it's in the toggled "on" state AND being hovered over.
The material applied to the button when it's in the toggled "on" state and not being interacted with.
The material applied to the toggled button when the user is actively interacting with it.
The texture displayed when the button is toggled on. Replaces defaultIcon for toggle and state buttons when activated.
When enabled, the State Button will maintain its pressed visual appearance after interaction ends while in the toggled state.
The RenderMeshVisual component of the button that will be used for ButtonFeedback.
Readonly
sceneThe scene object this component is on.
Readonly
uniqueWhen enabled, adds a glow effect to the button that can be independently animated with its own materials and blend shapes during interactions.
Adds a new SceneEvent, triggered by eventType
events, to the ScriptComponent.
Destroys the component.
Returns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
Static
getReturns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
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.
This class provides visual feedback for different types of buttons, such as Pinch Button, Toggle Button, and State Button. It allows customization of the button's appearance and behavior based on its state.