Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.3f1
Issue ID
1046717
Regression
No
GameObject's script component gives wrong warning after moving script file into "Editor" folder
How to reproduce:
1. Open attached "repro_1046717" project
2. Select gameObject "GameObject" inside Hierarchy view
3. Take note that inside Inspector view Script component is called "Test (Script)"
4. Inside Project view move "Test.cs" script into "Editor" folder
5. Look at Inspector view again and notice that Script component is now called "Game Object (Object)"
6. Select "Main Camera" object inside Hierarchy view and then reselect gameObject "GameObject"
7. Again notice that Script component, depending on what version you are testing, is now called either "Nothing selected" or "(Script)"
Expected result: While trying to move Script into "Editor" folder user receives warning stating that: it is not allowed to move MonoBehaviour script in to Editor and by doing that user will break any gameObject with such script attached
Actual result: Script file is successfully moved into Editor folder, Console prints warning "Game Object (named 'GameObject') references runtime script in scene file. Fixing!" and inside Inspector view user gets warning that script file can not be loaded asking them to fix compile errors
Reproducible with: 2017.1.4p1, 2017.2.3p1, 2017.4.5f1, 2018.1.4f1, 2018.2.0b7, 2018.3.0a1
Note: Works the same with the prefabs inside project view
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
- No character limit when renaming Profile in Addressables Profile window, allowing excessively long names
- Blurry, low quality Active Profile icon used in Addressables Profiles window
- Project browser search area changes when maximing Game View
- Tree Asset Preview window is not updated after assigning a new Material
- Unapplied changes on the "MainPanel" GameObject in the "BlobShadow" of URP Samples
Resolution Note:
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this issue.