Replies: 3 comments 3 replies
-
I'd be very interested in having hot reloads, and this mechanism looks promising. Would that allow you though to actually replace the DLL on Windows since there might be a lock on the file while it's open? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Also, does that work from regular .NET? |
Beta Was this translation helpful? Give feedback.
1 reply
-
And have you measured the performance overhead of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I took a look at the hot reloading example in the repo, and it looks like it uses the duplicate-and-rename DLL method, which has some disadvantages. There are a few different ways of doing hot reloading in Unity, and I'd like to try using the explicit library load and GetProcAddress method instead. The main advantage of it is that you can (somewhat) easily turn it off and on using an environment variable when building, so you can switch to basic P/Invoke for shipping more formal builds. To do this, you need your function signatures to switch between
[DllImport]
attributes and this custom delegate syntax based on a flag, like so:Is there a good way to accomplish generating these signatures with interoptopus? Maybe using a custom override (while keeping the other nice elements of the Unity override)?
Beta Was this translation helpful? Give feedback.
All reactions