- Home /
5.3 Scripts Appear Ghosted in The Inspector?
How come in my inspector after upgrading to 5.3 my scripts appear "Ghosted" in the inspector?
I'm not sure (hence the comment ins$$anonymous$$d of the answer), but I think because it makes sense to do so :p They are basically disabled, which makes sense as in most cases you got a lot of errors when you accidentally changed the script using that field anyway...
@troien, I don't get any script errors in the console and it plays fine in the editor. Usually if there are script errors it wont let me play in the editor.
I would think this is just the way Unity does it from now one to differentiate the Component link from the public variables on that component. I didn't really see a need for that change since the component is always the top one but it is there.
Thanks @fafase, I thought maybe there was something wrong with my project when I upgraded to 5.3, outside of that I can't seem to do a stand alone player build without the build crashing as soon as it tries to load my main scene.
I am not using 5.3. I never move to latest update until few patches. New version uses a new scene management system, I would make sure you fix all the warnings.
Answer by Bunny83 · Dec 11, 2015 at 10:38 PM
Well, they just made the script field readonly since it doesn't make much sense to assign or change the component "type".
Actually they could just remove that field. It was quite handy when you had a lost reference due to a script component rename. The "dead" component still had that field and showed "missing component". You could drag the new script onto that "field" to restore the component and rescue the serialized data that way. However they could simply hide the field and only show it for missing components.
Yeah @Bunny83 I agree, I get lost with all the files and sub files so being able to click in the inspector to bring up the scripts location is a very handy feature.
What other changes were made with how scripts are handled? The C# scripts we have in Unity communicating with other applications outside of unity no longer work in 5.3.5p3.
Can't agree with the 'doesn't make much sense to assign or change the component "type"' bit.
I've had to do it often.
It's particularly useful when you've created a subclass of a monobehaviour, and want to change a base class component to the new subclass. Dragging the new script onto the script field in the inspector would update the component's type while maintaining the values in the base class fields.
The good news is that this functionality has been hidden rather than removed. Switching to the "debug" view makes the script field writable again and so one can in fact still update the script field if needed. Since it's a rarely useful but potentially dangerous feature, I$$anonymous$$O it's not a bad thing that they made it difficult to do it accidentally.
See also https://answers.unity.com/questions/1112131/why-are-components-script-field-grayed-out.html
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Text in the scene is not being updated! 0 Answers
Can we refer to two rigidbodies2d in a single script? 0 Answers
Distribute terrain in zones 3 Answers
c# - List with multiple types - Trading Engine - Stock Simulator 2 Answers