-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RuntimeInitializeOnLoadMethodAttribute snippet automatically somehow(? #5
Comments
I think this is doable with some Cecil magic, but it will be tricky to avoid breaking compatibility with existing mods that have that snippet 🤔 |
I was wondering more where to add it, but true would also have to avoid breaking existing mods. I think using cecil to detect it should be possible, unless people manually call their init functions in which case it no longer works. |
Actually maybe thats not a problem because we can just tell people they no longer need the snippet, since they would have to manually update netcode patcher for this behaviour to be a thing anyway. Alternatively adding the snippet could be an option rather than a default |
Good points. I think probably the way to go is
|
We could alternatively provide a package containing compile resources, ie the snippet as a static method, and have people either package reference it + call it from an appropriate place or add snippet manually. I think that would be a cleaner solution tbh |
Well my issue is that i would like netcode patcher to behave as close as native unity as possible. |
idk how i would go about doing this tbh
The text was updated successfully, but these errors were encountered: