Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2020.1.9f1
2021.1
Issue ID
1291016
Regression
No
Plane.GetDistanceToPoint returns '0' on build (reason: mesh normals stripped away on build)
How to reproduce it:
1. Open the attached project 'testit.zip' (use testit_FBX.zip if do not have Blender)
2. Load 'SampleScene' from 'Assets' > 'Scenes' folder
3. Enter Play mode
4. In the Game view, walk around the corridors and notice that the passages in the center don't have deadlocks
5. Notice that the 'Distance' value changes in the Console view
6. Leave the Play mode
7. Build and run the game
8. Walk around the corridors and check the corridors in the center in the Build
9. Open an 'Player.log' file from the 'C:\Users\username\AppData\LocalLow\DefaultCompany\testit' and pay attention to 'Distance:' values
Expected result: 'Distance' value changes in the 'Player.log' file. Deadlocks don't appear in the central corridors in Build
Actual result: 'Distance' value doesn't change and remains '0' in the 'Player.log' file. Deadlocks appear in the central corridors in Build
Reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a9
Notes:
- Reproducible on Mac and Windows Standalone
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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note:
"Optimize Mesh Data" player settings option was removing mesh normals that are otherwise unused by mesh materials, but the game logic script was relying on them being valid.