private void UpdateKinematicVelocities(float stepTime) { //TODO this freezes unity FPS, so I commented out, lot of WARNINGS /* // differentiate positions/orientations to get our own velocites for kinematic objects. // when calling Physics.Simulate, MovePosition/Rotation do not work correctly. Also useful for animations. if (unityRigidbody.isKinematic) { // differentiate positions to obtain linear velocity: unityRigidbody.velocity = (transform.position - prevPosition) / stepTime;
// differentiate rotations to obtain angular velocity: var delta = transform.rotation * Quaternion.Inverse(prevRotation); unityRigidbody.angularVelocity = new Vector3(delta.x, delta.y, delta.z) * 2.0f / stepTime; }*/
21-03-2023, 09:07 AM (This post was last modified: 21-03-2023, 09:07 AM by josemendez.)
Seems like Unity 2022 does no longer support setting the velocity of a kinematic rigidbody and will throw a warning when doing so.
Commenting this piece of code will disable CCD for kinematic rigidbodies, which depending on what you're doing might be a bummer. Will work around this and get you an alternative asap.
(21-03-2023, 09:07 AM)josemendez Wrote: Seems like Unity 2022 does no longer support setting the velocity of a kinematic rigidbody and will throw a warning when doing so.
Commenting this piece of code will disable CCD for kinematic rigidbodies, which depending on what you're doing might be a bummer. Will work around this and get you an alternative asap.
with the ones attached, that should get rid of the warning. The workaround is basically to store our own linear/angular velocities for kinematic rigidbodies, instead of relying on Unity for this.
Should you encounter any issue with these modified scripts, please let me know.
with the ones attached, that should get rid of the warning. The workaround is basically to store our own linear/angular velocities for kinematic rigidbodies, instead of relying on Unity for this.
Should you encounter any issue with these modified scripts, please let me know.
kind regards,
thanks this is working,
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintSorter+CountSortPerFirstParticleJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintSorter+CountSortPerFirstParticleJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[[Obi.ConstraintSorter+SortSubArraysJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintSorter+SortSubArraysJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.ContactProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.ContactProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.FluidInteractionProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.FluidInteractionProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
(29-03-2023, 12:49 PM)lacasrac Wrote: thanks this is working,
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintSorter+CountSortPerFirstParticleJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintSorter+CountSortPerFirstParticleJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[[Obi.ConstraintSorter+SortSubArraysJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintSorter+SortSubArraysJob`1[[Obi.BurstContact, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.ContactProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.ContactProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
Compilation was requested for method `Unity.Jobs.IJobExtensions+JobStruct`1[[Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.FluidInteractionProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Obi.ConstraintBatcher+BatchContactsJob`1[[Obi.FluidInteractionProvider, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]&, Obi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)` but it is not a known Burst entry point. This may be because the [BurstCompile] method is defined in a generic class, and the generic class is not instantiated with concrete types anywhere in your code.
and this warnings?
Hi!
Newer Burst versions broke generic job compilation (in line with Unity's policy of breaking 3 features for every new one they add). This was addressed in Obi 6.5.1, in case you're using an older version I'd suggest updating to 6.5.1 since the fix/patch is not trivial to apply.
In case you're already using 6.5.1, may I ask which version of the Burst package you're currently using?
Newer Burst versions broke generic job compilation (in line with Unity's policy of breaking 3 features for every new one they add). This was addressed in Obi 6.5.1, in case you're using an older version I'd suggest updating to 6.5.1 since the fix/patch is not trivial to apply.
In case you're already using 6.5.1, may I ask which version of the Burst package you're currently using?
That's strange, could you check whether the file located at Obi/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintSorter.cs defines ConstraintSorter as:
Code:
public class ConstraintSorter<T> where T : struct, IConstraint
(roughly line 12 in the file).
(29-03-2023, 01:38 PM)lacasrac Wrote: burst 1.8.3
I try soon with 1.8.4
Latest Burst version that didn't exhibit this issue was 1.6. I'm not sure what the status is for 1.8.4.