diff --git a/Assets/UniGLTF/Runtime/SpringBoneJobs/InputPorts/FastSpringBoneBuffer.cs b/Assets/UniGLTF/Runtime/SpringBoneJobs/InputPorts/FastSpringBoneBuffer.cs index fcd2b61f5e..9e9887176f 100644 --- a/Assets/UniGLTF/Runtime/SpringBoneJobs/InputPorts/FastSpringBoneBuffer.cs +++ b/Assets/UniGLTF/Runtime/SpringBoneJobs/InputPorts/FastSpringBoneBuffer.cs @@ -103,7 +103,16 @@ public FastSpringBoneBuffer(Transform model, FastSpringBoneSpring[] springs) Joints = new NativeArray(blittableJoints.ToArray(), Allocator.Persistent); Colliders = new NativeArray(blittableColliders.ToArray(), Allocator.Persistent); Logics = new NativeArray(blittableLogics.ToArray(), Allocator.Persistent); - BlittableTransforms = new NativeArray(Transforms.Length, Allocator.Persistent); + BlittableTransforms = new NativeArray(Transforms.Select(transform => new BlittableTransform + { + position = transform.position, + rotation = transform.rotation, + localPosition = transform.localPosition, + localRotation = transform.localRotation, + localScale = transform.localScale, + localToWorldMatrix = transform.localToWorldMatrix, + worldToLocalMatrix = transform.worldToLocalMatrix + }).ToArray(), Allocator.Persistent); Profiler.EndSample(); }