Handwriter API Reference
Version 1.1.0
This document describes about APIs in Handwriter components.
Property | Type | Default | Desciption |
---|---|---|---|
speed | float | 1 | Writing speed in runtime (multiplies each stroke speed) |
bleeding | int | 10 | Ink bleeding |
autoStart | bool | false | Start writing automatically at Start() callback in MonoBehaviour lifecycle |
autoStartDelay | float | 0.0f | Delay seconds before auto start |
autoFadeOut | bool | false | Fade out automatically after finish writing |
autoFadeOutTime | float | 1.0f | Fade out time |
destroyAfterFadeOut | bool | false | Destroy the GameObject after auto fadeout |
positionFeedback | bool | false | Enable position feedback event |
currentWritingPositionTransform | Transform | null | Transform at writing position on current frame |
nextWritingPositionTransform | Transform | null | Transform at writing position on next frame |
_OnStartWriting | Unity Event | null | Invoke when start writing (refer detail of Event Listener section) |
_OnWritingProgress | Unity Event | null | Notify progress of writing (refer detail of Event Listener section) |
_OnStrokePosition | Unity Event | null | Invoke every position while writing if the position feedback option is enabled (refer detail of Event Listener section) |
_OnFinishWriting | Unity Event | null | Invoke when finish writing (refer detail of Event Listener section) |
Text | Text component | not null | Text Component on the same GameObject (Read only) |
Color | Color | Color.White | Base Color |
MinimumAlpha | float | 0 | Alpha Transparency value before written |
Start writing with parameters already specified in Editor mode.
Start writing with specified function parameters.
Parameter | Type | Default | Desciption |
---|---|---|---|
text | string | Text to write on Text component | |
speed | float | 1 | Writing speed on runtime (multiplies each stroke speed) |
delay | float | 0 | Delay seconds before start writing |
Manually sets writing progress on TextHandwriter with text on Text Component.
Parameter | Type | Default | Desciption |
---|---|---|---|
totalProgress | float | progress of writing text |
Manually sets writing progress on TextHandwriter with specified character index of text on Text Component.
Parameter | Type | Default | Desciption |
---|---|---|---|
characterIndex | int | Character index of writing position | |
progress | float | progress of writing character. (not whole text) |
Fadeout text.
Parameter | Type | Default | Desciption |
---|---|---|---|
seconds | seconds | fadeout seconds |
Immediatelly hide text.
Pause writing.
Resume writing if already paused.
Parameter | Type | Default | Desciption |
---|---|---|---|
textHandwriter | TextHandwriter | the component writing started |
Parameter | Type | Default | Desciption |
---|---|---|---|
textHandwriter | TextHandwriter | the component writing started | |
characterIndex | int | current writing character index of whole string | |
progress | float | wrirting progress of the character (not total progress of whole text) | |
totalProgress | float | wrirting progress of the writing text |
Parameter | Type | Default | Desciption |
---|---|---|---|
textHandwriter | TextHandwriter | the component writing started | |
currentPositionTransform | RectTransform | Transform Component that indicate writing position of current frame. The object is automatically created on Awake lifecycle callback if the position feedback option is enabled. | |
nextPositionTransform | RectTransform | Transform Component that indicate writing position of current frame. The object is automatically created on Awake lifecycle callback if the position feedback option is enabled. | |
interval | float | Interval seconds from current position to next position. Basically that is equal to the deltaTime of Unity. If current position is the end of stroke, it includes before |
MyParticleSystem.transform.position = currentPositionTransform.position
Parameter | Type | Default | Desciption |
---|---|---|---|
textHandwriter | TextHandwriter | the component | |
autoFadeout | bool | true if autoFadeout option is enabled |
Property | Type | Default | Desciption |
---|---|---|---|
speed | float | 1 | Writing speed on runtime (multiplies each stroke speed). If speed is 1, Handwriter process 60 writing steps per a second. |
bleeding | int | 10 | Ink bleeding |
autoStart | bool | false | Start writing automatically at Start() callback in MonoBehaviour lifecycle |
autoStartDelay | float | 0.0f | Delay seconds before auto start |
autoFadeOut | bool | false | Fade out automatically after finish writing |
autoFadeOutTime | float | 1.0f | Fade out time |
destroyAfterFadeOut | bool | false | Destroy the GameObject after auto fadeout |
positionFeedback | bool | false | Enable position feedback event |
currentWritingPositionTransform | Transform | null | Transform at writing position on current frame |
nextWritingPositionTransform | Transform | null | Transform at writing position on next frame |
_OnStartWriting | Unity Event | null | Invoke when start writing (refer detail of Event Listener section) |
_OnWritingProgress | Unity Event | null | Notify progress of writing (refer detail of Event Listener section) |
_OnStrokePosition | Unity Event | null | Invoke every position while writing if the position feedback option is enabled (refer detail of Event Listener section) |
_OnFinishWriting | Unity Event | null | Invoke when finish writing (refer detail of Event Listener section) |
Image | Image component | not null | Image Component on the same GameObject (Read only) |
Color | Color | Color.White | Base Color |
MinimumAlpha | float | 0 | Alpha Transparency value before written |
SelectableSpriteList | Sprite[] | null | Sprites in the Book (Read Only) |
Start writing with parameters already specified in Editor mode.
Start writing with specified function parameters.
Parameter | Type | Default | Desciption |
---|---|---|---|
speed | float | 1 | Writing speed on runtime (multiplies each stroke speed) |
delay | float | 0 | Delay seconds before start writing |
Manually sets writing progress on SpriteHandwriter with selected sprite.
Parameter | Type | Default | Desciption |
---|---|---|---|
progress | float | progress of writing sprite |
Fadeout image.
Parameter | Type | Default | Desciption |
---|---|---|---|
seconds | seconds | fadeout seconds |
Immediatelly hide image.
Pause writing.
Resume writing if already paused.
Parameter | Type | Default | Desciption |
---|---|---|---|
spriteHandwriter | SpriteHandwriter | the component writing started |
Parameter | Type | Default | Desciption |
---|---|---|---|
spriteHandwriter | SpriteHandwriter | the component writing started | |
sprite | Sprite | sprite | |
progress | float | wrirting progress of the sprite |
Parameter | Type | Default | Desciption |
---|---|---|---|
spriteHandwriter | SpriteHandwriter | the component | |
currentPositionTransform | RectTransform | Transform Component that indicate writing position of current frame. The object is automatically created on Awake lifecycle callback if the position feedback option is enabled. | |
nextPositionTransform | RectTransform | Transform Component that indicate writing position of current frame. The object is automatically created on Awake lifecycle callback if the position feedback option is enabled. | |
interval | float | Interval seconds from current position to next position. Basically that is equal to the deltaTime of Unity. If current position is the end of stroke, it includes before |
Parameter | Type | Default | Desciption |
---|---|---|---|
spriteHandwriter | SpriteHandwriter | the component | |
autoFadeout | bool | true if autoFadeout option is enabled |