modular-avatar/Editor/ReactiveObjects/AnimationGeneration/TargetProp.cs
bd_ d998763fbe
feat: add material switcher and inverse mode (#974)
* feat: add material switcher

Also refactor everything...

* refactor: simplify object curve handling

* refactor: additional refactoring and bugfixes

* feat: inverse mode

* feat: add material setter inspector UI

* chore: set material setter icon

* chore: fix error on build

* chore: adjust order of inverted element
2024-08-10 18:03:50 -07:00

35 lines
928 B
C#

using UnityEngine;
namespace nadena.dev.modular_avatar.core.editor
{
struct TargetProp
{
public Object TargetObject;
public string PropertyName;
public bool Equals(TargetProp other)
{
return Equals(TargetObject, other.TargetObject) && PropertyName == other.PropertyName;
}
public override bool Equals(object obj)
{
return obj is TargetProp other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
var hashCode = (TargetObject != null ? TargetObject.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (PropertyName != null ? PropertyName.GetHashCode() : 0);
return hashCode;
}
}
public override string ToString()
{
return $"{TargetObject}.{PropertyName}";
}
}
}