Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.2.11f1
2019.3
2020.1
2020.2
Issue ID
1231054
Regression
Yes
A null reference exception is thrown when trying to access EditorStyles.miniTextField property during script recompilation
How to reproduce:
1. Open the attached 'project-1231054.zip' project
2. Select the 'TestEditor' in the Hierarchy window
3. Open the 'TestScript' and make a code change to trigger script recompilation
4. Return to the Editor and observe the Console window
Expected result: no exceptions are thrown
Actual result: an exception is thrown
Reproducible with: 2018.4.20f1, 2019.3.8f1, 2020.1.0b4, 2020.2.0a5
Not reproducible with: 2017.4.38f1
Thrown exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_miniTextField () (at <b5e754b172ef4f1b82e78043441796df>:0)
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
- Shader warnings are thrown after building High Definition 3D template
- "EndLayoutGroup: BeginLayoutGroup must be called first" error is thrown when changing Shader Precision Model from the Build Profiles window
- White artifacts/outlines are visible in the Garden Scene when viewing at meshes from a distance
- Shader warnings "Sprite-Unlit-Default" are thrown after building 2D Platrformer Microgame Template
- [Android] HLSL shader becomes corrupted when running on an Android device
Resolution Note:
EditorStyles are invoked at a time in the script compilation pipeline where the Styles are not yet built. It would be risky and tedious to alter the current design and build the styles during the script compilation. Hence at this point we may not be able to fix this issue