Search Issue Tracker
Won't Fix
Votes
1
Found in
2017.2.0f3
Issue ID
976983
Regression
No
Physics.Raycast maxDistance field accepts LayerMask object as valid input when using Physics.Raycast()
To reproduce:
1. Open user's project, script Caster.cs
2. In line 33, observe the structure of Raycast
3. Enter Play mode
4. While in Play mode, you can toggle between Raycast maxDistance set and not set
Expected: editor doesn't compile as Raycast has a LayerMask type of object in the float field (check picture attached)
Actual: editor compiles and somehow still manages to cast a Ray with a maxDistance parameter type of LayerMask (check pictures)
Reproduced in: 5.5.5p2, 5.6.4p4, 2017.1.2p4, 2017.2.0p4, 2017.3.0f1, 2018.1.0a7
Note: any other in maxDistance field inserted different-typed objects were greeted with errors as intended
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
- Crash on __pthread_kill when launching Editor via command-line with "-disableManagedDebugger" argument
- [VFX] Deleting “New Group Node” name doesn’t allow to type or add new name
- [VFX] Creating a long Group Node name breaks nodes boarders
Add comment