Search Issue Tracker
By Design
Votes
0
Found in [Package]
Issue ID
1179962
Regression
No
Argument Exception is thrown when casting a Ray inside IJobForEach implementation
How to reproduce:
1. Download and open the attached project "1179962.zip"
2. Enter Play mode
Expected result: No errors are thrown
Actual result: Argument Exception error is thrown
Reproducible with Unity versions: 2019.2.8f1, 2019.3.0b5, 2020.1.0a7
Reproducible with package versions: 0.0.7-preview.12, 0.0.7-preview.13, 0.1.0, 0.1.1
Notes:
Casting a ray in implementation of IJob will result in Assertion Exception instead.
Casting a ray in implementation of IJobForEach will result in Assertion Exception if there are no Colliders in the Scene.
Could not test on earlier package versions due to Console errors.
Could not test with earlier Unity versions due to Console errors thrown when installing the affected package versions.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
The first assert (ArgumentException: Slice may not be used on a restricted range array) arises because the QuadtreeHeightSystem script does not have the [ReadOnly] attribute on the CollisionWorld field of the QuadtreeHeightJob struct.
The second assert (AssertionException: Assertion failure. Value was False) arises because the user's RayCastSystem and QuadtreeHeightSystem scripts do not specify a valid filter for the query. They should at least do: new RaycastInput { Filter = CollisionFilter.Default }