Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2022.2.12f1
2023.1.0b10
2023.2.0a8
Issue ID
UUM-31850
Regression
Yes
Script Component is treated as an Editor script when attaching to GameObject and when there are two partial classes with the same name and file name in the project
Reproduction steps:
1. Open the attached "repro_IN-36142WrongMessage.zip" project
2. Open the "Assets/Scenes/SampleScene" Scene
3. In the Hierarchy window, select the "TestObject" GameObject
4. In the Project window, drag and drop the "Assets/FirstPartClass" script to the Inspector window
5. Observe the error message
Expected result: The error message shows "Can't add script component 'FirstPartClass' because the script class cannot be found..."
Actual result: The error message shows "The script is an editor script."
Reproducible with: 2022.2.9f1, 2022.2.13f1, 2023.1.0b10, 2023.2.0a8
Not reproducible with: 2022.2.8f1
Could not test with: 2020.2.46f1, 2021.3.22f1 (There is no error message)
Reproduced on: Windows 10
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
- “FMOD failed to set the software format to the custom sample rate…” warnings are thrown as System Sample Rate value is being changed in Audio section of Project Settings window
- VFX Marquee selection does match the visual indicator
- “Invalid AABB aabb” errors are spammed when “Infinity” value is entered in Collider Component fields
- Editor Role does not sync with the MPPM Play Mode Scenario Role when entering Play mode
- Long asset names cause overlap with the “Find” function in search result tabs
Resolution Note:
This is an improvement, as we need to know what *.cs file a given class is coming from. This is because that file will act as the one dependencies will be setup on, ie. for attaching to gameobjects, serialization ect.
Before the behavior could be inconsistent because it would depend on order, now we highlight the issue with a error and can consistently get the same file for a class.
Resolution Note (2023.2.X):
This is an improvement, as we need to know what *.cs file a given class is coming from. This is because that file will act as the one dependencies will be setup on, ie. for attaching to gameobjects, serialization ect.
Before the behavior could be inconsistent because it would depend on order, now we highlight the issue with a error and can consistently get the same file for a class.