Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2020.2.X
Votes
0
Found in
2020.1.0a7
2020.2
2020.2.0b12
2021.1
Issue ID
1295088
Regression
Yes
Preprocessor blocks cause script to no longer be recognized as a MonoBehaviour
Reproduction steps:
1. Open user's attached project
2. In Project window, select and open the script in Assets folder
3. Observe the Inspector window
4. In script editor, comment out lines 2-3
5. Observe the Inspector window
Expected result: No warning on either observation
Actual result: "No MonoBehaviour scripts in the file" warning when lines are not commented out
Reproducible with: 2020.1.0a7, 2020.1.15f1, 2020.2.0b13, 2021.1.0a7
Not reproducible with: 2019.4.15f1, 2020.1.0a6
Could not test with: 2018.4.29f1 (console errors break project)
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
- Multiple errors occur when setting the Render Object Event to AfterRenderingPostProcessing while using STP for Upscaling
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
- Crash on __pthread_kill when launching Editor via command-line with "-disableManagedDebugger" argument
- [VFX] Deleting “New Group Node” name doesn’t allow to type or add new name
Resolution Note (fix version 2021.1):
Fixed in 2021.2.0a1
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b1
Resolution Note (fix version 2020.2):
Fixed in 2020.2.2f1