Skip to content

Commit

Permalink
Prevent hash ids from being serialized
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgraham committed Jun 18, 2023
1 parent a5c44d9 commit 92e9e42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Editor/AnimatorParameterPropertyDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public sealed class AnimatorParameterPropertyDrawer : PropertyDrawer
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
SerializedProperty name = property.FindPropertyRelative("m_Name");
SerializedProperty hash = property.FindPropertyRelative("m_Hash");

EditorGUI.BeginProperty(position, label, property);

Expand All @@ -18,7 +17,6 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
if (nameValue != name.stringValue)
{
name.stringValue = nameValue;
hash.intValue = Animator.StringToHash(nameValue);
property.serializedObject.ApplyModifiedProperties();
}

Expand Down
2 changes: 1 addition & 1 deletion Runtime/DataStructures/AnimatorParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Zigurous.Animation
[System.Serializable]
public struct AnimatorParameter
{
[SerializeField]
[System.NonSerialized]
[HideInInspector]
private int m_Hash;

Expand Down

0 comments on commit 92e9e42

Please sign in to comment.