Search Issue Tracker
Fixed in 2020.2.X
Votes
0
Found in
2019.4
2020.1.4f1
2020.2
Issue ID
1275953
Regression
No
Compiler error is thrown in the Console log when assigning a value to a readonly struct property's setter
How to reproduce:
1. Open the attached "1275953_repro.zip" project
2. Open the NewBehaviourScript.cs script
3. Observe the NewBehaviourScript.cs script in the external code editor
4. Go back to the Unity Editor
5. Observe the Console log
Expected result: No errors are thrown in the Console log
Actual result: "Error CS1604: Cannot assign to 'this' because it is read-only" error message is thrown in the Console log
Reproducible with: 2018.4.27f1, 2019.4.10f1, 2020.1.5f1, 2020.2.0a11
Not reproducible with: 2020.2.0a12, 2020.2.0b3
Note:
- No actual values are getting modified, but the error message still appears
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
- Specular lighting visible in a camera with Path Tracing when Preserve specular lighting is disabled in observed material
- Cinemachine package throws CS1061 errors in the Console when installed in a project that has HDRP and URP installed
- Editor.log file size grows rapidly when a scene exceeds the "Maximum Shadow on Screen" limit setting in the HDRP Asset
- Player build freezes after calling Application.Quit() when the scripting backend is set to IL2CPP
- Texture is not applied on a Custom Render Texture when a Cubemap is selected as the texture
Resolution Note (fix version 2020.2):
Fixed in: 2020.2.0a12