Reference for the Live2D extension


Overview

This is a reference page for the Live2D extension. The Live2D SDK and extension scripts are required to use Live2D, so please reference Try Live2D with Utage to set it up.

Click here to download the Utage extension scripts and samples.

In addition, the assets under SampleLive2D in the sample package can be deleted without issue. It is best to delete them so they will not take up space when you release your game.

Adding Live2DForUtage Component

Although already set for the sample scene, you must add the Live2DForUtage component to AdvEngine to use Live2D in scenes you have created yourself.

Importing Resources

Live2D files are located under /Resources/ProjectName/Live2D.

Resource files must be in the model.json format. Create resources in Live2DViewer or similar software and import them into Unity.

Settings Sheet Reference

Configure character and texture sheets to use Live2D files instead of image files.

  • Enter the .model.json file used under FileName.
  • Enter Live2D under FileType.

Scale value, pivot, etc. can be used with the normal settings. Since the base size of Live2D is that of the canvas configured in Live2D, very large settings may be used. Magnify the scale value to adjust the size.

Commands Reference

Sample

Displaying Characters

Characters are essentially displayed like normal when the character name is assigned to Arg1. Although assigning an animation name to Arg2 is slightly different, the same procedures shown in Basic Character Display Commands can be used.
However, it is possible to use a special method when assigning an expression name to Arg4 as shown below.

Description Arg1 Arg2 Arg3 Arg4 Arg5
Display character Character name Animation name to be played
Or randomly play
animation from specified
group name
Layer name Expression name
Enter “Clear” to return to default expression
Animation
playback type

Animation Playback Type

The special animation playback types NoReplay, Loop, and IdleOnEnd can be assigned to Arg5.

Arg5 (Animation Playback Type) Description
Blank Stop playback of animation.
IdleOnEnd Play random idle animation after animation playback.
Loop Loop playback of the animation.
NoReplay Do not replay the animation if the same animation has been played immediately prior. Use NoReplay to end a Loop or to prevent playback of the same animation when you do not know what the previous animation might be such as after a scenario junction point or a jump.

Branch Off Scenarios Depending on Which Area is Touched

You can configure collision detection with Live2D. Check here to learn how to set up collision detection.
In Utage you can use collision detection to branch off the scenario depending on the area the player touches.
Although basically the same as the standard SelectionClick command in Utage, you can assign part names such as the head or body to Arg 6.

Command Description Arg1 Arg2 Arg3 Arg4 Arg5 Arg6
SelectionClick Branch off scenario depending on which area is touched ** Scenario label to jump to** Does not enable
if the logical expression to enable the function is false
Formula executed when selected Object name Part name

The yellow boxes highlight the touchable areas. The scenario branches off in different directions depending on if player touches the head or body.

Other Specifications

The Live2D extension for Utage includes the following specifications.

Idle Animations

The extension has idle animations used as the basic poses during standby.
A random idle animation will be played when no animation is set such as immediately after a character is displayed.
In addition, like with IdleOnEnd, a random idle animation can be played after playback of a specific animation.
Set idle animations under the animation group name “idle” in Live2DViewer in advance.

Blinking and Breathing

Blinking and breathing are added automatically, so there is no need to add them to animations.

Voice

Voices will not be played even if you add a voice to an animation in Live2DViewer.
Specify a voice using Utage’s usual format (enter the file name in the Voice column).

Lip Synching

Character’s lips will automatically move in sync with the text.
In addition, character lips are synced to match the audio as the voice file plays. (This is currently not supported in the WebGL version of Unity 5.1.)
Since the text and voice will not match the lip synching if you add it to the animation itself, we recommended that you do not add lip synching to the animation.

Advanced Settings

Live2D advanced settings can be changed from the Live2DForUtage component.

LipSyncType Description
Sound Type Playback method for sound files including in Live2D animation
Eye Blink Type Type of eye blink
Breath Type Type of breath
Lip Sync Type Type of lip sync
Text Lip Sync Speed Lip sync speed (How many times to open and close the character’s mouth per second)
Voice Lip Sync Type of voice lip sync
Voice Lip Sync Scale Volume How much to open character’s mouth scaled to the volume of the voice
Voice Lip Sync Smoothing Smooth lip syncing with voice lip

 

Sound Type Description
Ignore Do not play sound
Voice Play as voice
Se Play as Se

 

Eye Blink Type Description
Always Always blink (even during animation playback)
None Do not blink
IdleOrAnimationFinished Only during idle animations and after animations have finished

 

BreathType Description
Always Always breathe
None Do not breathe
IdleOrAnimationFinished Only during idle animations and after animation has finished
AnimationFinished Only after animation has finished

 

LipSync Type Description
Always Always sync lips
None Do not sync lips
IdleOrAnimationFinished Only during idle animations and after animation has finished
OnlyAnimationFinished Only after animation has finished

 

VoiceLipSyncType Description
Always While character’s voice is playing
None Do not synch lips
OnlyInPage Only in pages where that voice is playing

Tools

A viewer has been added that displays the Live2D model’s animation name, expression name, and parameters during playback.

Open from Tools>Utage>Live2D Viewer

Animation denotes the animation name, Eanimation the expression name, and the rest are Live2D parameters.

 

Final Notes

Please visit the Q&A Corner to share any comments and requests you have about Live2D and what else you would like to see from the software in the future.
We work with Live2D to improve the user experience based the on comments we receive.