Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
Votes
1
Found in
2020.3.47f1
2021.3.23f1
2022.2.15f1
2023.1.0b12
2023.2.0a10
Issue ID
UUM-33791
Regression
No
RaycastCommand documentation needs to be updated.
Raycast command docs need updating, from the Fogbugz entry:
"I know the issue is old and closed, but can the documentation please be updated and mention that multiple hits per ray are not supported? "The documentation simply doesn't explain this very well." is a huge understatement - the documentation<https://docs.unity3d.com/ScriptReference/RaycastCommand.html> literally mentions how to use the maxHits parameter, and how to get the additional hits from the result.
I've spent a great deal of time troubleshooting my code and trying to figure out why it isn't working, only to eventually find this issue that it was never supposed to work at all. Since it was my first time working with Jobs and Commands, I wasn't really confident in my code and it made the whole learning process a lot harder.
If the feature is already implemented and there indeed was some unsolved issue on my end, I apologize - I can't confidently say that I did everything properly, but my debugging results seem to indicate that the behavior is still as described here - that it only supports the first hit.
Due to the plainly wrong and missleading documentation, I've spent a lot of development and learning time wasted on a feature that I can't use, since it can't do what I need, and the RaycastCommand with multiple hits was the only reason I started implementing Jobs into my project. If it wasn't mentioned in the documentation that it supports multiple hits, I'd have looked elsewhere and saved a lot of time. And I'm sure I'm not the only one who encounters this issue in the last 5 years since this bug report, so for the sake of future developers stumbling onto this API call, can the documentation please be updated to mention this?"
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Fixed, RaycastCommand will return as many hits as you define in maxHits for RaycastCommand.ScheduleBatch(). See more on documentation page: https://docs.unity3d.com/ScriptReference/RaycastCommand.html
Tested in 2023.3.0a17
Resolution Note (2023.2.X):
Fixed, RaycastCommand will return as many hits as you define in maxHits for RaycastCommand.ScheduleBatch(). See more on documentation page: https://docs.unity3d.com/ScriptReference/RaycastCommand.html
Tested in 2023.3.0a17