Search Issue Tracker
Won't Fix
Votes
2
Found in
2020.1.0a4
2020.3
2020.3.31f1
Issue ID
1411917
Regression
Yes
[M1] Incorrect calculation of values using multiplication with Mathf.Sqrt() when an unused variable is declared
How to reproduce:
1. Open the user attached "M1 Issue Repo Package.zip" project
2. Open the "SampleScene" Scene
3. Enter Play Mode
Expected result: "nonZeroValue = 8.660254" is logged
Actual result: "nonZeroValue = 0" is logged
Reproducible with: 2020.1.0a4, 2020.3.33f1
Not Reproducible with: 2019.4.38f1, 2020.1.0a3, 2021.3.1f1, 2022.1.0f1, 2022.2.0a11
Note:
- Reproducible on a new project
- Not reproducible on non-Silicon macOS and Windows
- Switching to Debug Mode and entering Play Mode shows the correct values
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
- Assigned font's bold/font-weight styles render using Default Font's assets when Default Font has corresponding style assets defined in TMP Settings
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
- Images are missing from the "Open the sprite editor" documentation for 6.0, 6.1 and 6.2
- The previous element in the array is modified when assigning an Asset to a new element of AssetReferenceT
Resolution Note (2020.3.X):
After investigation it was determined that this issue was fixed by the mono upgrade starting in version 2021.2 and backporting the required changes to 2020.3 would be non-trivial. The issue only reproduces in the editor and not during a mac standalone player runtime. It is also easy to work-around by performing the Sqrt function on a separate line than the multiplication. While this isn't ideal it will have to suffice to bridge the gap to where this issue is fixed in later versions. Additionally the defining of an unused variable appears to not be required to reproduce the bug.