Skip to content

Commit

Permalink
fix: Vector4のリセットが抜けていたので修正
Browse files Browse the repository at this point in the history
  • Loading branch information
pspkurara committed Sep 7, 2020
1 parent db2e443 commit e520b25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Packages/uGUI-Skinner/Runtime/SkinParts/TransformScale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override void OnApplyValue(Transform obj)
public static SkinParts CreateSkinParts(IEnumerable<Transform> transforms, Vector3 localScale)
{
var parts = new SkinParts();
SkinnerUtility.ResetColor(parts.property.colorValues, VectorLength);
SkinnerUtility.ResetVector4(parts.property.vector4Values, VectorLength);
parts.property.objectReferenceValues.AddRange(transforms.Cast<Object>());
parts.property.vector4Values[VectorIndex] = localScale;
return parts;
Expand Down
10 changes: 10 additions & 0 deletions Packages/uGUI-Skinner/Runtime/SkinnerUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ public static void ResetInteger(List<int> resetList, int count = 0)
ResetList(resetList, count, 0);
}

/// <summary>
/// Vector4リストを指定数に合わせて正規化する
/// </summary>
/// <param name="resetList">初期化対象</param>
/// <param name="count">設定したい要素数</param>
public static void ResetVector4(List<Vector4> resetList, int count = 0)
{
ResetList(resetList, count, Vector4.zero);
}

/// <summary>
/// リストを指定数に合わせて正規化する
/// </summary>
Expand Down

0 comments on commit e520b25

Please sign in to comment.