- Home /
Recompiled plugins not refreshing in Unity
Hi, I'm trying to create a set of plugins in XCode and test them using a simple Unity project.
My problem seems to be that when recompiling and copying the bundle into the Assets/Plugins folder Unity doesn't pick up the new versions and is caching them somewhere instead (when using the 'Game' mode). However, if I Build&Run OR restart Unity the correct / new versions are picked up and used in the created application which tells me they are being put in the correct place.
How do I refresh Unity to use the new versions of the plugins without restarting it completely?
Thanks,
Nathan
Answer by taoa · Mar 30, 2011 at 01:56 PM
Try Reimporting your plugins/bundles.
Edit from your comment:
Then it's likely that once your bundle is loaded by the editor, it won't be unloaded until Unity is actually stopped.
On Windows, the DLL file would be locked for writing, stopping you from overwiting it. This happens to us here.
But on OSX, since it's a Unix-based system, executable files are fully loaded in memory while the actual file isn't locked. That's why you can overwrite your previous version of your bundle, and because the bundle file itself has changed, Unity picks up on that change and reimport the bundle ( -> activity spinner). Yet the bundle loaded in memory doesn't get unloaded/reloaded with the new version.
I don't think there's anything you can do on your side on this. I'd suggest filing a Bug Report demonstrating the issue to Unity, if not already done.
Unfortunately this does not work. The activity spinner shows that something is being done but the result is the same... Still have to completely restart Unity to get it to notice the change
$$anonymous$$ono has problems dealing with updated DLLs, apparently, as discussed in this post. So the suggested path is to restart Unity to see DLL changes or potentially use a wrapper DLL to get around this.
I was able to close out of mono and Unity after recompiling a bundle and that fixed my Entrypointnotfoundexception issue. I did not need to do a reimport.
Your answer
![](https://koobas.hobune.stream/wayback/20220613115632im_/https://answers.unity.com/themes/thub/images/avi.jpg)