Search Issue Tracker
Fixed in 2020.1.X
RaycastResult.sortingLayer always returns the default Layer when Raycast hits a GameObject with a Tilemap Renderer
How to reproduce:
1. Open the user-submitted project "RaycastHit.sortingLayer.zip"
2. Open the SampleScene
3. Enter Play mode
4. Click on the Tilemap GameObject
Expected result: "My Sorting Layer" is printed as RaycastResult.sortingLayer
Actual result: "Default" is printed as RaycastResult.sortingLayer
Reproducible with: 2018.4.13f1, 2019.2.14f1, 2019.3.0b12, 2020.1.0a14
Could not test on Unity 2017.4, due to a fatal error being thrown when opening the project.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Shadows flickering when a Mesh's Cast Shadows are set to Shadows Only and Camera is moving with Spotlight
- AudioMixer exposed parameters cause assertions when hidden and prevent the drop-down from functioning
- Package Manager/My Assets: 401 Response code trying to download a paid asset store package
- TrailRenderer.SetPosition will log a Index out of bounds error when index is in bounds of the positionCount property
- [URP] Graphics.DrawMeshInstancedIndirect rendering correctly after clicking an another application/refreshing Assets