- Home /
What happened to conveniently replacing component scripts in the inspector?
Image to illustrate:
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?
"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! :)
Answer by Bonfire-Boy · Jan 11, 2016 at 12:12 PM
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.
Good to hear it. In answer to your follow-up question, I also was surprised that they felt a need for such a change. Perhaps they'd had lots of reports from people who'd lost stuff after changing scripts accidentally.
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!
O$$anonymous$$G! 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!