Unity How can I change live2d animation speed object in unity?

BLT_kazuka

New Member
Mar 19, 2025
5
0
The problem is I try simple thing in unity I change speed animation but live2d model animation is played base on animation speed, but I need to adjust speed animation to faster how can I do it? My unity version is 2022.3.19f1 and SDK cubism 5.
 

NMMMN

Newbie
Feb 19, 2020
32
29
1. Adjust Animation Speed via Animator Controller (Recommended)

  • Go to your Animator Controller in Unity.
  • Select the animation State (e.g., Idle, Walk, etc.) inside the Animator.
  • In the Inspector, change the Speed value under the animation’s settings.
  • A value of 1.0= Normal speed.
    • 2.0 = 2x faster.
    • 0.5 = Half speed (slower).

This method is the most stable for animation speed control.


2. Adjust Animation Speed via Script (Alternative Method)

If they need to change the speed dynamically (e.g., in response to player actions), they can modify the speed in code like this:


csharp
CopyEdit
using Live2D.Cubism.Framework.Motion;
using UnityEngine;

public class AnimationSpeedController : MonoBehaviour
{
public CubismMotionController motionController;

void Start()
{
if (motionController != null)
{
motionController.Speed = 2.0f; // 2x faster animation
}
}
}


This is ideal if they want animations to speed up or slow down during gameplay.


3. Adjust Animation Speed in Timeline (For Cinematic Sequences)

If they’re using the Timeline for animations:


  • Select the animation track.
  • In the Inspector, adjust the Playback Speed property.

Best for cutscenes or scripted events.


4. For Live2D Cubism 5 SDK Specific Issue (SDK Fix)

If none of the above methods work, the SDK may have its own system for controlling playback speed.


For CubismMotionController, they can try this:


csharp
CopyEdit
CubismMotionController motionController = GetComponent<CubismMotionController>();
motionController.Speed = 1.5f; // 1.5x faster


Which Solution Fits Their Problem?

Since they mentioned Live2D models and animation speed, the best solution is likely:
Animator Controller Speed setting (if static speed change)
CubismMotionController script (if dynamic speed change)
 

BLT_kazuka

New Member
Mar 19, 2025
5
0
1. Adjust Animation Speed via Animator Controller (Recommended)

  • Go to your Animator Controller in Unity.
  • Select the animation State (e.g., Idle, Walk, etc.) inside the Animator.
  • In the Inspector, change the Speed value under the animation’s settings.
  • A value of 1.0= Normal speed.
    • 2.0 = 2x faster.
    • 0.5 = Half speed (slower).

This method is the most stable for animation speed control.


2. Adjust Animation Speed via Script (Alternative Method)

If they need to change the speed dynamically (e.g., in response to player actions), they can modify the speed in code like this:


csharp
CopyEdit
using Live2D.Cubism.Framework.Motion;
using UnityEngine;

public class AnimationSpeedController : MonoBehaviour
{
public CubismMotionController motionController;

void Start()
{
if (motionController != null)
{
motionController.Speed = 2.0f; // 2x faster animation
}
}
}


This is ideal if they want animations to speed up or slow down during gameplay.


3. Adjust Animation Speed in Timeline (For Cinematic Sequences)

If they’re using the Timeline for animations:


  • Select the animation track.
  • In the Inspector, adjust the Playback Speed property.

Best for cutscenes or scripted events.


4. For Live2D Cubism 5 SDK Specific Issue (SDK Fix)

If none of the above methods work, the SDK may have its own system for controlling playback speed.


For CubismMotionController, they can try this:


csharp
CopyEdit
CubismMotionController motionController = GetComponent<CubismMotionController>();
motionController.Speed = 1.5f; // 1.5x faster


Which Solution Fits Their Problem?

Since they mentioned Live2D models and animation speed, the best solution is likely:
Animator Controller Speed setting (if static speed change)
CubismMotionController script (if dynamic speed change)
That's is a problem, I used your first method but the problem is when I use Settrigger or Setbool parameter the speed animation is back to 1.
 

NMMMN

Newbie
Feb 19, 2020
32
29


Why Does Speed Reset?

Unity's Animator Controller has a built-in behavior where:

✅ The Animator Speed value is state-specific.
✅ When a state transition occurs (e.g., from Idle to Attack), Unity resets the Animator's Speed to its default state value.
✅ Calling SetTrigger() or SetBool() triggers a new state transition, which reinitializes the animation settings, including Speed.
 

BLT_kazuka

New Member
Mar 19, 2025
5
0


Why Does Speed Reset?

Unity's Animator Controller has a built-in behavior where:

✅ The Animator Speed value is state-specific.
✅ When a state transition occurs (e.g., from Idle to Attack), Unity resets the Animator's Speed to its default state value.
✅ Calling SetTrigger() or SetBool() triggers a new state transition, which reinitializes the animation settings, including Speed.
Your solution make animator speed has change but live2d model animation speed is still same.
 

NMMMN

Newbie
Feb 19, 2020
32
29
tbh i never used live2D, maybe check the sdk manual:


i did find this:

Timing of Value Operations in Cubism SDK for Unity

Updated: 07/25/2019


When manipulating the values of model parameters in Unity, it is recommended to do so at the time of MonoBehaviour.LateUpdate().



// Not recommended
private void Update()
{
_cubismModel.Parameters[0].Value = value;

_cubismModel.Parameters[1].BlendToValue(CubismParameterBlendMode.Additive, value);
}


// Recommended.
private void LateUpdate()
{
_cubismModel.Parameters[0].Value = value;

_cubismModel.Parameters[1].BlendToValue(CubismParameterBlendMode.Additive, value);
}


In the Live2D Cubism SDK for Unity, animation playback uses Unity’s built-in Animator and Playable APIs, which apply parameter values between MonoBehaviour.Update() and MonoBehaviour.LateUpdate().
Therefore, if a parameter value is set in MonoBehaviour.Update(), the value may be overwritten by the animation due to the execution order.
________________________________________

if not try asking on the unity forums, best of luck ^ ^;;
 

NMMMN

Newbie
Feb 19, 2020
32
29
maybe try to make a parameter of Speed in live2D that can modify the speed of the entire animation?
idk if thats possible, but if so option 2 should work.

When accessing these variables, make sure to type it exactly as seen; its case sensitive.

Try and change these variables in late update based on the sdk recommendations above; it should run once after everything else has been processed. if in fixedupdate it will run ever physics tick, if in Update it will run continuously unless you have a condition where it runs once like this:

bool runOnce=false;

if(!runOnce)
{
//run code once, like change speed
runOnce = true;
}