Skip to content

Commit

Permalink
Fixed poses not being saved correctly for some .NET versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
originalnicodr committed Jan 20, 2025
1 parent ca46607 commit e7d5911
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Cinematic/Serializers/BonesSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ public CachedBonesTransform(Vector3 position, Vector3 angles, Vector3 scale)
this.scale = scale;
}

public readonly Vector3 position;
public readonly Vector3 angles;
public readonly Vector3 scale;
// They cant be read-only because it causes problems with XML serialization in older versions of .NET
public Vector3 position { get; set; }
public Vector3 angles { get; set; }
public Vector3 scale { get; set; }

public void CopyToTransform(Transform transform){
transform.localPosition = position;
Expand Down

0 comments on commit e7d5911

Please sign in to comment.