mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
57fe84548c
* refactor: generalize the shape changer implementation a bit * feat: shape changer can respond to multiple parent objects being animated Closes: #865
18 lines
601 B
C#
18 lines
601 B
C#
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
|
|
namespace nadena.dev.modular_avatar.animation
|
|
{
|
|
internal class EditorCurveBindingComparer : IEqualityComparer<EditorCurveBinding>
|
|
{
|
|
public bool Equals(UnityEditor.EditorCurveBinding x, UnityEditor.EditorCurveBinding y)
|
|
{
|
|
return x.path == y.path && x.type == y.type && x.propertyName == y.propertyName;
|
|
}
|
|
|
|
public int GetHashCode(UnityEditor.EditorCurveBinding obj)
|
|
{
|
|
return obj.path.GetHashCode() ^ obj.type.GetHashCode() ^ obj.propertyName.GetHashCode();
|
|
}
|
|
}
|
|
} |