live2D (sdk가 6.5 미지원으로 sprite로 대응)

This commit is contained in:
2026-08-08 22:13:54 +09:00
parent 9ce6930772
commit 8a4a001fe0
4278 changed files with 287426 additions and 18 deletions

View File

@@ -0,0 +1,94 @@
/**
* 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 System;
using UnityEngine;
namespace Live2D.Cubism.Framework
{
public abstract class CubismInspectorAbstract : MonoBehaviour, ICubismUpdatable
{
/// <summary>
/// Called by cubism update controller. Order to invoke OnLateUpdate.
/// </summary>
public abstract int ExecutionOrder { get; }
/// <summary>
/// Called by cubism update controller. Needs to invoke OnLateUpdate on Editing.
/// </summary>
public bool NeedsUpdateOnEditing => false;
/// <summary>
/// Model has cubism update controller component.
/// </summary>
public bool HasUpdateController { get; set; }
/// <summary>
/// Called by cubism update controller. Updates controller.
/// </summary>
public abstract void OnLateUpdate();
#if UNITY_EDITOR
/// <summary>
/// CubismModel cache.
/// </summary>
[NonSerialized, HideInInspector]
public CubismModel Model;
/// <summary>
/// Override values.
/// </summary>
[NonSerialized, HideInInspector]
public float[] OverrideValues;
/// <summary>
/// Flag whether to Ovaerride.
/// </summary>
[NonSerialized, HideInInspector]
public bool[] OverrideFlags;
/// <summary>
/// Editor UI Update delegate.
/// </summary>
/// <param name="sender"></param>
public delegate void ValueChangesHandler(CubismInspectorAbstract sender);
/// <summary>
/// Editor UI Update event.
/// </summary>
public event ValueChangesHandler OnChangedValues;
/// <summary>
/// Dispatch Editor UI Update event.
/// </summary>
protected void DispatchValueChanges()
{
OnChangedValues?.Invoke(this);
}
/// <summary>
/// Called by Unity.
/// </summary>
public void OnEnable()
{
// Get cubism update controller.
HasUpdateController = (GetComponent<CubismUpdateController>() != null);
}
/// <summary>
/// Called by Unity.
/// </summary>
private void LateUpdate()
{
// OnLateUpdate is not called because OriginalWorkflow is assumed.
}
#endif
}
}