Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Indicates whether the element is currently being dragged. This property is used to track the drag state of the element.
Protected_Protected_Protected_Protected_Protected_Protected_Protected_ProtectedaddReadonlyapiGeneric 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.
ProtectedcolliderProtectedcolliderProtectedcolliderProtectedcurrentProtectedcurrentIf disabled, the Component will stop enacting its behavior.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
ProtectedmanagedProtectedmanagedProtectednumberReadonlyonReadonlyonAn event that is triggered when a hover interaction starts on the element.
ReadonlyonAn event that is triggered when a hover interaction ends on the element.
ReadonlyonA public API event that is triggered when the element is initialized.
ReadonlyonReadonlyonAn event that is triggered whenever the state of the element changes.
ProtectedonReadonlyonAn event that is triggered when a trigger interaction starts on the element.
ReadonlyonAn event that is triggered when a trigger interaction ends on the element.
ReadonlyonReadonlysceneThe SceneObject this component is on.
ProtectedsegmentedProtectedsnapProtectedstateReadonlyuniqueProtectedvisualGets the ColliderComponent instance associated with this element. The collider is used for detecting interactions or collisions with the element.
The collider instance.
Gets the custom center position of the collider. This position is only used when colliderFitElement is false.
The custom collider center position in local space coordinates.
Sets the custom center position of the collider. This position is only applied when colliderFitElement is false.
The custom collider center position in local space coordinates.
Gets whether the collider automatically fits the element's size.
True if the collider fits the element, false if using custom size/position.
Sets whether the collider should automatically fit the element's size.
True to make the collider fit the element, false to use custom size/position.
Gets the custom size of the collider. This size is only used when colliderFitElement is false.
The custom collider size in local space coordinates.
Sets the custom size of the collider. This size is only applied when colliderFitElement is false.
The custom collider size in local space coordinates.
Gets the children of the element that are not managed by the element.
The children of the element that are not managed by the element.
Gets the number of children of the element that are not managed by the element.
The number of children of the element that are not managed by the element.
Gets the current value of the slider. This is the actual value of the element, and is updated immediately after user input
The current value.
Sets the current value of the slider.
The new value to set, which should be between 0 and 1.
If the value is outside the range [0, 1], a warning is logged and the value is not set. If the value is the same as the current value, a debug message is logged and the value is not set. Otherwise, the current value is updated, a debug message is logged, the knob position is updated, and the onValueChangeEvent is invoked.
ProtecteddeltaProtecteddeltaGets whether the visual element has a shadow.
Whether the visual element has a shadow.
Sets whether the visual element has a shadow. If the hasShadow is set to true, the shadowVisual object will be created and configured.
Whether the visual element has a shadow.
is inactive or not
set is inactive or is not inactive
Indicates whether the element has been initialized.
true if the element is initialized, otherwise false.
Gets the interactable property of the element.
The current interactable instance associated with this element.
Gets a value indicating whether the slider component is draggable.
always return true, as it is always draggable.
ProtectedisProtectedisSets the size of the knob. If the new size is different from the current size, it updates the knob size.
Gets the current spring animation configuration for the knob.
The current spring configuration including stiffness (k), damping, and mass values.
Updates the spring animation configuration for the knob.
The new spring configuration. Only provided properties will be updated.
The current position of the knob as a normalized value from 0-1.
This differs from the currentValue, as the currentValue may be set, while the knobValue is animating to that position. If you want the actual value of the element, please use currentValue
The current value.
Gets the visual representation of the slider's knob.
The visual object representing the knob.
Sets the visual representation of the slider's knob. If a previous visual exists, it will be destroyed before assigning the new one.
The new visual to be assigned to the knob.
Gets the value indicating whether audio playback is enabled.
true if audio playback is enabled; otherwise, false.
Sets the playAudio behavior and initializes the audio component if necessary.
A boolean indicating whether audio should be played.
If set to true and the audio component is not already created,
a new audio component will be instantiated and attached to the scene object.
Gets the value indicating whether trigger down audio playback is enabled.
true if trigger down audio playback is enabled; otherwise, false.
Sets the playTriggerDownAudio behavior and initializes the audio component if necessary.
A boolean indicating whether trigger down audio should be played.
If set to true and the audio component is not already created,
a new audio component will be instantiated and attached to the scene object.
Gets the value indicating whether trigger up audio playback is enabled.
true if trigger up audio playback is enabled; otherwise, false.
Sets the playTriggerUpAudio behavior and initializes the audio component if necessary.
A boolean indicating whether trigger up audio should be played.
If set to true and the audio component is not already created,
a new audio component will be instantiated and attached to the scene object.
Gets the render order of the Slider.
The render order of the Slider.
Sets the render order of the Slider.
The render order of the Slider.
Sets the position offset of the shadow.
The position offset of the shadow.
Gets the associated DropShadowVisual instance for this component.
The DropShadowVisual instance linked to this component, if any.
Sets the size of the visual element.
A vec3 representing the dimensions of the visual element.
Gets the style of the visual element.
The style of the visual element.
Gets the visual representation of the slider's track fill.
The visual object representing the track fill.
Sets the visual representation of the slider's track fill. If a previous visual exists, it will be destroyed before assigning the new one.
The new visual to be assigned to the track fill.
Gets the audio track to be played at the end of a trigger event.
The audio track asset associated with the trigger end event.
Sets the audio track to be played at the end of a trigger event.
The audio track asset to be assigned.
Gets the volume level for the trigger end audio.
The volume level for the trigger end audio.
Sets the volume level for the trigger end audio.
The desired volume level as a number.
Gets the audio track to be played when the trigger starts.
The audio track asset associated with the trigger start event.
Sets the audio track to be played when the trigger starts.
The audio track asset to be assigned.
Gets the volume level for the trigger start audio.
The volume level for the trigger start audio.
Sets the volume level for the trigger start audio.
The desired audio volume level as a number.
Gets the type string of the visual element.
The type string of the visual element.
ProtectedconfigureProtectedconfigureProtectedcreateAdds a new SceneEvent, triggered by eventType events, to the ScriptComponent.
ProtectedcreateDestroys the component.
ProtecteddisableProtecteddisableProtectedenableProtectedenableProtectedgetReturns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
StaticgetReturns the name of this object's type.
Initializes the slider component. This method sets up the visual and knob visual elements if they are not already defined, and ensures the default value is within the valid range.
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.
ProtectedonProtectedonProtectedonProtectedonProtectedonProtectedonProtectedonProtectedonProtectedonProtectedonProtectedplayPlays the specified audio track at the given volume.
The audio track asset to be played.
The volume level at which the audio track should be played.
Registers a tooltip instance with the current component
The Tooltip instance to associate with this component.
ProtectedreleaseRemoves a previously added SceneEvent from the ScriptComponent.
ProtectedremoveProtectedsetSets the tooltip text for the visual element.
The text to be displayed in the tooltip.
ProtectedsetProtectedsetProtectedupdateUpdates the current value of the slider with optional animation control.
The new value to set. Must be between 0 and 1 (inclusive).
Whether to animate the transition to the new value using spring physics.
When true, the knob will spring animate from current to target value.
When false (default), the knob jumps immediately to the new value.
Protectedupdate
Represents a slider component that allows users to select a value within a specified range. The slider includes a draggable knob and emits events when the value changes or interaction finishes.
Remarks