Closed Calandiel closed 4 years ago
Indeed, you really should be able to edit it.
To solve this I'll need to know your setup. In particular about the names because this should be the important factor here. My first guesses are:
[DllImport]
, do you specify DLLs like you normally would? (This is MyDll
or MyDll.dll
but not __MyDll
)I changed the pattern from {assets}/Plugins/__{name}.dll
to {assets}/Plugins/{name}.dll
I added logs inside DllManipulator.cs in LoadAll(), inside the innermost foreach loop. It logs names of my dlls functions correctly, so I assumed it found it just fine.
My dll is called mmo_client.dll and my dll imports are simply [DllImport("mmo_client")]
Could the fact that my dll is blocking a file and a socket after the game is closed cause any issues?
You see, the straight {assets}/Plugins/{name}.dll
pattern is unfortunately not allowed because this is what Unity excepts, so it loads the plugin when it has the opportunity to do so, even though it won't actually use it. This is why I have to bother with these underscores. I guess I should have documented this.
So if you change it back to default (or anything other than current one) and also change the file names of DLLs accordingly it should work then. For the release build you'll have to remember to change the files back to normal though (so Unity can use them in the usual way). I can't really help here but I guess its not so bad.
Oh, I see. That explains a lot. Thanks ^ . ^
I'm not sure why. I have a game object with the dll manipulator script set to preload mode. Having added some logs in DllManipulator it seems like all functions are loaded and unloaded correctly. And yet, I can't replace the dll with a new version without closing unity first. Did I misunderstand the purpose of this repository?