Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2020.2
2020.2.0a15
Issue ID
1257737
Regression
No
Scripts are deleted if the script's file name is empty and the escape button is pressed in rename mode
How to reproduce:
1. Open any Unity project
2. In the Project window, right click and create a new C# Script
3. Delete the name while in rename mode and press Escape
Expected result: the Script's name is reverted to the original ("NewBehaviourScript") and the Script is deselected
Actual result: the Script vanishes
Reproducible with: 2018.4.24f1, 2019.3.16f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a15
Notes:
1. Not reproducible when renaming an already existing Script
2. The Script does not get deleted when renaming it to an empty string by clicking away from the Script or pressing Enter instead of Escape
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (2020.2.9f1):
As the script/ asset is new if you dont give it a name we discard the creation.