Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Assets/Live2D/Cubism/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [5-r.1-beta.3] - 2023-11-14

### Added

* Add `HarmonicMotion` sample scenes.

### Changed

* Change the version of the development project to `2021.3.30f1`.
* Change the value of `Editor` to `AnyCPU` in the `Platform settings` of `Live2DCubismCore.bundle`.
* Apple Silicon version of the Unity Editor will work without the need to change `Platform settings`.

### Fixed

* Fix an error when displaying CubismRendererInspector for uninitialized models.
* Fix condition for clearing AnimationCurve when Reimporting .motion3.json.


## [5-r.1-beta.2] - 2023-09-28

### Added
Expand Down Expand Up @@ -332,6 +350,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Fix issue where Priority value was not reset after playing motion with CubismMotionController.


[5-r.1-beta.3]: https://github.com/Live2D/CubismUnityComponents/compare/5-r.1-beta.2...5-r.1-beta.3
[5-r.1-beta.2]: https://github.com/Live2D/CubismUnityComponents/compare/5-r.1-beta.1...5-r.1-beta.2
[5-r.1-beta.1]: https://github.com/Live2D/CubismUnityComponents/compare/4-r.7...5-r.1-beta.1
[4-r.7]: https://github.com/Live2D/CubismUnityComponents/compare/4-r.6.2...4-r.7
Expand Down
10 changes: 10 additions & 0 deletions Assets/Live2D/Cubism/Editor/Inspectors/CubismRendererInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/


using Live2D.Cubism.Core;
using Live2D.Cubism.Rendering;
using UnityEditor;
using UnityEngine;
Expand Down Expand Up @@ -35,6 +36,15 @@ public override void OnInspectorGUI()
return;
}

if (!renderer.isActiveAndEnabled)
{
var model = renderer.FindCubismModel(true);
var ctrl = model.GetComponent<CubismRenderController>();
if (!ctrl.IsInitialized)
{
ctrl.TryInitializeRenderers();
}
}

// Show settings.
EditorGUILayout.ObjectField("Mesh", renderer.Mesh, typeof(Mesh), false);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Live2D/Cubism/Framework/Json/CubismMotion3Json.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public AnimationClip ToAnimationClip(AnimationClip animationClip, bool shouldImp
, bool isCallFormModelJson = false, CubismPose3Json poseJson = null)
{
// Clear curves.
if (shouldClearAnimationCurves && (!shouldImportAsOriginalWorkflow || (isCallFormModelJson && shouldImportAsOriginalWorkflow)))
if (!shouldImportAsOriginalWorkflow || (isCallFormModelJson && shouldImportAsOriginalWorkflow && shouldClearAnimationCurves))
{
animationClip.ClearCurves();
}
Expand Down
10 changes: 0 additions & 10 deletions Assets/Live2D/Cubism/NOTICE.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

# お知らせ

## [注意事項] Apple Silicon版 Unity Editor での動作について (2023-01-26)

Apple Silicon版Unity Editorでの動作につきまして、macOS向けのCubism Coreを利用するには `Assets/Live2D/Cubism/Plugins/macOS` 以下にある `Live2DCubismCore.bundle` をインスペクタから操作する必要があります。
手順は以下の通りとなります。

1. `Live2DCubismCore.bundle` を選択状態にし、インスペクタを表示する。
1. `Platform settings` の `Editor` を選択し、`Apple Silicon` または `Any CPU` を選択する。
1. Unity Editorを再起動する。


## [注意事項] Windows 11の対応状況について (2021-12-09)

Windows 11対応につきまして、Windows 11上にて成果物の動作を確認しております。
Expand Down
10 changes: 0 additions & 10 deletions Assets/Live2D/Cubism/NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

# Notices

## [Caution] Operation on the Apple Silicon version of Unity Editor (2023-01-26)

To use Cubism Core for macOS on the Apple Silicon version of the Unity Editor, you need to modify the `Live2DCubismCore.bundle` under `Assets/Live2D/Cubism/Plugins/macOS` from the inspector.
The procedure is as follows:

1. Select `Live2DCubismCore.bundle` and display the inspector.
1. Go to `Platform Settings` > `Editor` and select `Apple Silicon` or `Any CPU`.
1. Restart the Unity Editor.


## [Caution] Support for Windows 11 (2021-12-09)

Regarding Windows 11 compatibility, we have confirmed that the deliverables work on Windows 11.
Expand Down
13 changes: 9 additions & 4 deletions Assets/Live2D/Cubism/Plugins/macOS/Live2DCubismCore.bundle.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Assets/Live2D/Cubism/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Unity Editor拡張機能は、`./Assets/Live2D/Cubism/Editor`にあります。

| Unity | バージョン |
| --- | --- |
| Latest | 2023.1.14f1 (*1) |
| LTS | 2022.3.10f1 |
| LTS | 2021.3.30f1 |
| Latest | 2023.1.19f1 (*1) |
| LTS | 2022.3.12f1 |
| LTS | 2021.3.31f1 |

*1 ARMv7のAndroidは非対応です。

Expand Down Expand Up @@ -87,9 +87,9 @@ https://docs.unity3d.com/ja/2018.4/Manual/CSharpCompiler.html
| iOS | 16.6.1 |
| iPadOS | 16.6.1 |
| Ubuntu | 20.04.6 |
| macOS | 13.6 |
| macOS | 14.1.1 |
| Windows 10 | 22H2 |
| Google Chrome | 115.0.5790.171 |
| Google Chrome | 119.0.6045.106 |
| Chrome OS 64bit (x86_64) | 116.0.5845.210 |
| Chrome OS 32bit (ARMv8) (*3) | 115.0.5790.160 |

Expand Down
9 changes: 5 additions & 4 deletions Assets/Live2D/Cubism/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ Resources like shaders and other assets are located in `./Assets/Live2D/Cubism/R

| Unity | Version |
| --- | --- |
| Latest | 2023.1.14f1 (*1) |
| LTS | 2022.3.10f1 |
| LTS | 2021.3.30f1 |
| Latest | 2023.1.19f1 (*1) |
| LTS | 2022.3.12f1 |
| LTS | 2021.3.31f1 |

*1 ARMv7 Android is not supported.

Expand Down Expand Up @@ -88,9 +88,10 @@ https://docs.unity3d.com/ja/2018.4/Manual/CSharpCompiler.html
| iOS | 16.6.1 |
| iPadOS | 16.6.1 |
| Ubuntu | 20.04.6 |
| macOS | 13.6 |
| macOS | 14.1.1 |
| Windows 10 | 22H2 |
| Google Chrome | 115.0.5790.171 |
| Google Chrome | 119.0.6045.106 |
| Chrome OS 64bit (x86_64) | 116.0.5845.210 |
| Chrome OS 32bit (ARMv8) (*3) | 115.0.5790.160 |

Expand Down
27 changes: 23 additions & 4 deletions Assets/Live2D/Cubism/Rendering/CubismRenderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,31 @@ public CubismRenderer[] Renderers
[HideInInspector]
public bool HasUpdateController { get; set; }

/// <summary>
/// <see cref="IsInitialized"/>s backing field.
/// </summary>
private bool _isInitialized = false;

/// <summary>
/// Is renderers initialized.
/// </summary>
[HideInInspector]
public bool IsInitialized
{
get
{
return _isInitialized;
}
private set
{
_isInitialized = value;
}
}

/// <summary>
/// Makes sure all <see cref="CubismDrawable"/>s have <see cref="CubismRenderer"/>s attached to them.
/// </summary>
private void TryInitializeRenderers()
public void TryInitializeRenderers()
{
// Try get renderers.
var renderers = Renderers;
Expand All @@ -530,12 +550,10 @@ private void TryInitializeRenderers()
.FindCubismModel()
.Drawables;


renderers = drawables.AddComponentEach<CubismRenderer>();

// Store renderers.
Renderers = renderers;

}

if (renderers == null)
Expand All @@ -549,12 +567,13 @@ private void TryInitializeRenderers()
renderers[i].TryInitialize(this);
}


// Initialize sorting layer.
// We set the backing field here directly because we pull the sorting layer directly from the renderer.
_sortingLayerId = renderers[0]
.MeshRenderer
.sortingLayerID;

IsInitialized = true;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UnlitMaskedInverted
m_Shader: {fileID: 4800000, guid: b6ac6b89a3f2a5d4ba21b017d47b480c, type: 3}
m_ShaderKeywords: CUBISM_INVERT_ON
m_ValidKeywords:
- CUBISM_INVERT_ON
- CUBISM_MASK_ON
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand All @@ -27,6 +30,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Cull: 0
- _DstAlpha: 10
Expand All @@ -39,3 +43,6 @@ Material:
m_Colors:
- cubism_MaskTile: {r: 0, g: 0, b: 0, a: 0}
- cubism_MaskTransform: {r: 0, g: 0, b: 0, a: 0}
- cubism_MultiplyColor: {r: 1, g: 1, b: 1, a: 1}
- cubism_ScreenColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
8 changes: 8 additions & 0 deletions Assets/Live2D/Cubism/Samples/HarmonicMotion.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Live2D/Cubism/Samples/HarmonicMotion/Description.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[English](Description.md) / [日本語](Description.ja.md)

---

# Harmonic Motion

このサンプルは、Harmonic Motion機能を示しています。
Harmonic Motionは手動で設定する必要がありますが、設定はそれほど面倒ではありません。
モデルのGameObjectに`CubismHarmonicMotionController`コンポーネントを追加し、Harmonic Motionに使用にしたいParameterに`CubismHarmonicMotionParameter`を追加します。

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Live2D/Cubism/Samples/HarmonicMotion/Description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[English](Description.md) / [日本語](Description.ja.md)

---

# Harmonic Motion

This sample demonstrates the Harmonic Motion functionality.
Harmonic Motion must be set up manually, but setting it up isn't too cumbersome.
Add a `CubismHarmonicMotionController` component to the game object model and add `CubismHarmonicMotionController` to the parameters you want to make harmonic motion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading