live2D (sdk가 6.5 미지원으로 sprite로 대응)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright(c) Live2D Inc. All rights reserved.
|
||||
*
|
||||
* Use of this source code is governed by the Live2D Open Software license
|
||||
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
|
||||
*/
|
||||
|
||||
|
||||
using Live2D.Cubism.Core;
|
||||
using Live2D.Cubism.Framework.Expression;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Live2D.Cubism.Samples.OriginalWorkflow.Expression
|
||||
{
|
||||
public class CubismExpressionPreview : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// ExpressionController to be operated.
|
||||
/// </summary>
|
||||
CubismExpressionController _expressionController;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get expression controller.
|
||||
/// </summary>
|
||||
private void Start()
|
||||
{
|
||||
var model = this.FindCubismModel();
|
||||
|
||||
_expressionController = model.GetComponent<CubismExpressionController>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change facial expression.
|
||||
/// </summary>
|
||||
/// <param name="expressionIndex">index of facial expression to set.</param>
|
||||
public void ChangeExpression(int expressionIndex)
|
||||
{
|
||||
if (_expressionController != null)
|
||||
{
|
||||
_expressionController.CurrentExpressionIndex = expressionIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bddcd8258f84d649931e49729290208
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
[English](Description.md) / [日本語](Description.ja.md)
|
||||
|
||||
---
|
||||
|
||||
# Expression
|
||||
|
||||
このサンプルは、OriginalWorkflowを使用したCubismモデルのシンプルな表情の適用方法を示しています。
|
||||
|
||||
表情の名前が付いた各ボタンをクリックすると、表情が再生されます。
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 314717a3c9ca8453bb215114abe9a0a7
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
[English](Description.md) / [日本語](Description.ja.md)
|
||||
|
||||
---
|
||||
|
||||
# Expression
|
||||
|
||||
This sample shows a simple facial expression reproduction of a Cubism model with OriginalWorkflow.
|
||||
|
||||
Expression will be played when you click each button with the expression name.
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15f7182dbdab72145836630c4e0ffaf1
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Live2D/Cubism/Samples/OriginalWorkflow/Expression/Expression.unity
LFS
Normal file
BIN
Assets/Live2D/Cubism/Samples/OriginalWorkflow/Expression/Expression.unity
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b02aa818d25bae948a64d0f26ee73928
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user