PredictionUtils: Fixed pre-Unity 2022.3 errors

This commit is contained in:
MrGadget 2024-01-25 09:35:02 -05:00
parent 41d12e67c3
commit 5616f8c5a0

View File

@ -309,15 +309,17 @@ public static void MoveHingeJoints(GameObject source, GameObject destination)
jointCopy.connectedMassScale = sourceJoint.connectedMassScale;
jointCopy.enableCollision = sourceJoint.enableCollision;
jointCopy.enablePreprocessing = sourceJoint.enablePreprocessing;
jointCopy.extendedLimits = sourceJoint.extendedLimits;
jointCopy.limits = sourceJoint.limits;
jointCopy.massScale = sourceJoint.massScale;
jointCopy.motor = sourceJoint.motor;
jointCopy.spring = sourceJoint.spring;
jointCopy.useAcceleration = sourceJoint.useAcceleration;
jointCopy.useLimits = sourceJoint.useLimits;
jointCopy.useMotor = sourceJoint.useMotor;
jointCopy.useSpring = sourceJoint.useSpring;
#if UNITY_2022_3_OR_NEWER
jointCopy.extendedLimits = sourceJoint.extendedLimits;
jointCopy.useAcceleration = sourceJoint.useAcceleration;
#endif
GameObject.Destroy(sourceJoint);
}