프로퍼티 | 타입 | 설명 | |
---|---|---|---|
current | UISlider, | ||
direction | Direction, | ||
eventReceiver | GameObject | ||
foreground | Transform | ||
functionName | string | ||
numberOfSteps | int | ||
onValueChange | OnValueChange | ||
thumb | Transform |
메소드 | 설명 | |
---|---|---|
Awake ( ) : void |
Ensure that we have a background and a foreground object to work with.
|
|
ForceUpdate ( ) : void |
Force-update the slider. Useful if you've changed the properties and want it to update visually.
|
|
Init ( ) : void |
Initialize the cached values.
|
|
OnDrag ( Vector2 delta ) : void |
When dragged, figure out where the mouse is and calculate the updated value of the slider.
|
|
OnDragThumb ( GameObject go, Vector2 delta ) : void |
Callback from the thumb.
|
|
OnKey ( KeyCode, key ) : void |
Watch for key events and adjust the value accordingly.
|
|
OnPress ( bool pressed ) : void |
Update the slider's position on press.
|
|
OnPressThumb ( GameObject go, bool pressed ) : void |
Callback from the thumb.
|
|
Set ( float input, bool force ) : void |
Update the visible slider.
|
|
Start ( ) : void |
We want to receive drag events from the thumb.
|
|
UpdateDrag ( ) : void |
Update the slider's position based on the mouse.
|
public OnDragThumb ( GameObject go, Vector2 delta ) : void | ||
go | GameObject | |
delta | Vector2 | |
리턴 | void |
public OnPressThumb ( GameObject go, bool pressed ) : void | ||
go | GameObject | |
pressed | bool | |
리턴 | void |