Save/Restore the values to be manipulated.

[Last updated: 01/30/2020]


This page describes the procedure for saving/restoring parameter values and part opacity to a Cubism model using ParameterStore.
The following assumes that the SDK is added to a project that has already been “Import SDK” and “UpdateController Settings”.


About CubismParameterStore

If you import a model with the “Live2D/Cubism/OrignalWorkflow/Should Import As Original Workflow” checkbox in the Unity editor menu, the CubismParameterStore component will be set in the generated prefab.

CubismParameterStore is a component that restores and stores Cubism model parameter values and part opacity before and after the AnimationClip is played.
This can be used to avoid the glitches that occur when other Cubism components manipulate values relative to each other, such as Additive and Multiply.
The value manipulations performed by Cubism components in Additive and Multiply blends assume that the value manipulations performed in the previous frame have been reset.
If the value is overwritten by AnimationClip, then the value manipulation by the Cubism component works correctly because the previous value manipulation is overwritten.
However, if the played animation does not manipulate the value, it may not behave as expected because the last manipulated value remains unchanged for the next update, resulting in duplicate values to be calculated.
CubismParameterStore saves all parameter values of the model to which it is attached at the LateUpdate() timing immediately after processing the animation, and restores the saved values at Update() of the next frame.
This allows components to operate normally on parameters whose values are not overridden by animation.


The following procedure is used to save/restore parameter values and part opacity in a model generated by the conventional method.
 1. Attach CubismParameterStore

* To use ParameterStore, “UpdateController setting” is required.


1. Attach CubismParameterStore

Attach a “CubismParameterStore” to the GameObject that is the root of the model to store/restore values.

© 2010 - 2022 Live2D Inc.