From f1de67b3393ca8e4af6d82886ca515943b5854e2 Mon Sep 17 00:00:00 2001 From: mkc1370 Date: Fri, 29 Jul 2022 18:23:03 +0900 Subject: [PATCH] Revert "fixed BlendShapeAvatar.Clips not to contain null" This reverts commit ef06850e17bdf3d692b5e9a4339bf2044b404187. --- .../Runtime/BlendShape/BlendShapeAvatar.cs | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/Assets/VRM/Runtime/BlendShape/BlendShapeAvatar.cs b/Assets/VRM/Runtime/BlendShape/BlendShapeAvatar.cs index 814fe574f..6129050e3 100644 --- a/Assets/VRM/Runtime/BlendShape/BlendShapeAvatar.cs +++ b/Assets/VRM/Runtime/BlendShape/BlendShapeAvatar.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using UniGLTF; using System.IO; -using UnityEngine.Serialization; #if UNITY_EDITOR using UnityEditor; #endif @@ -14,34 +13,23 @@ namespace VRM [CreateAssetMenu(menuName = "VRM/BlendShapeAvatar")] public class BlendShapeAvatar : ScriptableObject { - [FormerlySerializedAs("Clips")] [SerializeField] - private List clips = new List(); - - public List Clips - { - get - { - RemoveNullClip(); - return clips; - } - set => clips = value; - } + public List Clips = new List(); /// /// NullのClipを削除して詰める /// public void RemoveNullClip() { - if (clips == null) + if (Clips == null) { return; } - for (int i = clips.Count - 1; i >= 0; --i) + for (int i = Clips.Count - 1; i >= 0; --i) { - if (clips[i] == null) + if (Clips[i] == null) { - clips.RemoveAt(i); + Clips.RemoveAt(i); } } }