Closed c3-hoge-fuga-piyo closed 8 months ago
It appears that this is an error that depends on the version of the Collections package.
NativeContainer has its own safety checks, which are implemented differently depending on the version of Collections. 1.x uses a reference type called DisposeSentinel to perform the checks, so NativeContainer is a managed structure, whereas in 2.x it is unmanaged because only the AtomicSafetyHandle is used. Therefore, in 1.x, the pointer cannot be obtained and an error is occurring.
The solution is to change the code to use the version with the safety check removed depending on the version of Collections. This would compromise safety, but since there are already enough checks in between, it should not be a problem.
Fixed in #118.
When installing the latest version (b2684c12023392b689e83465e89a8c1d46172328) in a new project created with Unity 2022.3.21f1 or Unity 2023.3.9f1, a compile error occurs at the following location.
This did not occur at 83b455a547e64a26da963d6067906b8c76866a36
https://github.com/AnnulusGames/LitMotion/blob/b2684c12023392b689e83465e89a8c1d46172328/src/LitMotion/Assets/LitMotion/Runtime/MotionUpdateJob.cs#L22
https://github.com/AnnulusGames/LitMotion/blob/b2684c12023392b689e83465e89a8c1d46172328/src/LitMotion/Assets/LitMotion/Runtime/MotionUpdateJob.cs#L168