Skip to content

Commit

Permalink
Prevent ArgumentException when animating same property name on multip…
Browse files Browse the repository at this point in the history
…le components on the same gameObject
  • Loading branch information
marwie committed Sep 11, 2023
1 parent c93f68c commit a7b4e2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Runtime/Scripts/SceneExporter/ExporterAnimation.cs
Expand Up @@ -465,7 +465,12 @@ public void AddPropertyCurves(Object animatedObject, AnimationCurve curve, Edito
TryFindMemberBinding(binding, prop, prop.propertyName);
}

propertyCurves.Add(memberName, prop);
if (propertyCurves.ContainsKey(memberName))
{
Debug.LogError("Animating the same property on multiple components is currently not supported: " + memberName, animatedObject);
}
else
propertyCurves.Add(memberName, prop);
}
else
{
Expand Down

0 comments on commit a7b4e2c

Please sign in to comment.