warbler / SharpMonoInjector

A tool for injecting assemblies into Mono embedded applications, commonly Unity Engine based games
MIT License
310 stars 108 forks source link

Unloading issue #6

Closed johmarjac closed 5 years ago

johmarjac commented 5 years ago

Hi,

thanks for this cool tool. It works very good. However for the comfort I want to use the unloading too. Unloading in general seems to work just fine. It is at least calling the Unload() method I implemented in my dll which removes the GameObject.

However if I try to inject again, then the game crashes and Sharp Mono Injector says: Arithmetic Overflow Exception.

Do I have to anything else in my dll to unload?

warbler commented 5 years ago

In your unload method you should destroy any game objects you have created, dispose any IDisposables and so on. If you were doing that already, please try the latest version and let me know how it goes.

johmarjac commented 4 years ago

@warbler I am sorry, have been completely inactive on this issue. The issue even occurs when I inject only the sample that you ship with the repository.

May I kindly ask you to try it yourself on that game? Its only 27MB on Steam, called Adventure Quest 3D.