What happened to conveniently replacing component scripts in the inspector?

Image to illustrate:

61688-cym3kkkwyau1jw5.jpg

Note that the “Limb” script is greyed out where I’ve circled it in red. In previous versions of Unity, you’d be able to drag a script that derived from Limb over this one and it would keep all the corresponding values set up. As far as I can tell, I’d have to remove “Limb” and readd my derived script to the object. This example is simple but for complex components re-setting up ALL the variables manually is a lot of time consuming work, not to mention external references that will be lost. Surely there’s another simple way to do this now?

EDIT: you can switch to debug mode and still do this, but why the change?

Not tried it myself but I remember someone saying that changing to Debug mode (from the drop-down next to the padlock icon at the top of the Inspector pane) re-enables the script field.

"you'd be able to drag a script that derived from Limb over this one and it would keep all the corresponding values set up" did not know that, thanks!

excellent question from a new user. I sent you a "reward point"! :)

Whoa - that is an amazing coincidence. I had exactly 30,000 points, literally that number, when I gave you a point. Enjoy! :)

1 Answer

1

Not tried it myself but I remember someone saying that changing to Debug mode (from the drop-down next to the padlock icon at the top of the Inspector pane) re-enables the script field.

Yep, that works, thanks!

WOW! This saved my life today! Thanks and yes it works, also for prefabs and the object that instantiate it! All references (also for events) stayed intact!

OMG! I've been with the engine since 3.X and have been missing this since then. I had no idea I could just switch to debug mode and have it working like it used to. I feel like such an idiot now! A very happy idiot though :D Now it will be sooo much easier getting my DLL components working!