Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.30f1
2022.2.0a2
Issue ID
UUM-53126
Regression
No
"Can't add script" is thrown when adding a script with the presence of an apostrophe in a class
How to reproduce:
1. Open the attached project "UnityBrokenIfAttempts.zip"
2. Add Assets/Scenes/TestBehaviour.cs to the "GameObject" in the Hierarchy window
Expected results: "TestBehaviour.cs" is added to the "GameObject"
Actual results: Can't add script window is shown
Reproducible with: 2021.3.30f1, 2022.2.0a2
Not reproducible with: 2022.2.0a3, 2022.3.10f1, 2023.1.15f1, 2023.2.0b11, 2023.3.0a7
Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested
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
- Number "0" is not visible in Unity Documentation page button tooltips
- Selected Korean input text in UIToolkit TextField is not fully replaced when refocusing and entering new input
- [UITK Controls] Non text InputField can't be reset by API
- Control Scheme name field has no character limit, causing “Add Control Scheme” window to expand if name is too long
- Prefab variants do not keep the values of linear drag and angular drag while upgrading the project from Unity 6000.0
Resolution Note:
From 2022.2 this issue is fixed, but its impossible to backport as it was a fundamental change. In 2022.2 we use Roslyn to extract the information we need.
The Parser used before 2022.2 also evaluates all #if as true, so in this case it breaks as it does not compile.