I have various editor scripts that do various things, and one script in particular is giving me a bit of trouble. All it does is draw a gizmo for me, but I've changed the icon of the gizmo itself, and Unity keeps drawing the old gizmo, not the new one.
How can I "refresh" my editor scripts, forcing them to re-compile, or reload any related resources?
Edit: To be more specific, the resource (icon) I'm using as my gizmo is somehow cached by Unity... is there any way to efficiently refresh that?
Answer by e.bonneville
Mar 29, 2010 at 08:23 PM
If I were you, I'd just copy your script into a new file. It's a hassle, but it should work.
You could also try re-importing them.
Turns out in order to refresh the actual texture asset I need to re-import it under a different filename. It's a pain in the ass, but it works.
Well if it works, it works. ;)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
Permanent handles (when object is not selected)
Custom Transform Editor in Scene Editor
The name 'Joystick' does not denote a valid type ('not found')
Editor Scripting - Override Scaling
Update editorscript if gameobject is manipulated.