Skip to content
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

hot reload function #302

Open
Eddio0141 opened this issue Aug 7, 2024 · 0 comments
Open

hot reload function #302

Eddio0141 opened this issue Aug 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Eddio0141
Copy link
Owner

Eddio0141 commented Aug 7, 2024

For the sake of faster development

  • This will be done via patching all UniTAS methods at runtime to the one from disk
  • It will be provided to the lua interpreter as reload function
    • reload("~/src/UniTAS") giving it the project path will grab the release build automatically
    • reload("~/custom/dir/something.dll") giving it a direct path to the dll also works
  • Methods will be patched via harmony
    • If a method accesses a field that doesn't exist, it'll create a fake field in either a new class's instance loaded elsewhere (probably a separate AppDomain) for field access, or a dictionary to grab that field from, and replaces any access to that field through ilcode manip
    • If a new method is detected, create a dynamic method, where all ilcode access is replaced with that
    • If a new type is detected, similar to the case where field doesn't exist, along with new methods for it
  • This MUST be done in a repeatable way, all of this should "just work" unless a preloader patcher change or something very specific changes
  • Should also redo all harmony patches just in case!
@Eddio0141 Eddio0141 added the enhancement New feature or request label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant