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

Integration with Unity #53

Closed
ENikS opened this issue Nov 29, 2017 · 8 comments
Closed

Integration with Unity #53

ENikS opened this issue Nov 29, 2017 · 8 comments

Comments

@ENikS
Copy link

ENikS commented Nov 29, 2017

It is not really an Issue...

I am considering modernization of Unity.Interception and looking at different libraries for technologies and inspirations.

I was wondering if Harmony could be used for that purpose and if it has any advantages over other implementations?

@pardeike
Copy link
Owner

Is there more documentation on this interception project? I’m not sure I have the time to go through the source code to guess what it is actually doing. Maybe you can be more specific with your question.

@ENikS
Copy link
Author

ENikS commented Nov 29, 2017

The documentation is available here.
I am looking for better performance and functionality to be implemented in next version.

@pardeike
Copy link
Owner

Now I see. Harmony was mainly designed to decorate methods of a code base that was never made extensible in the first place. Microsofts Unity is a container that allows for decoration by design.

It is a bit difficult to compare or combine both approaches since they have complete different scenarios in mind. Harmony can be applied at runtime and relies on manipulating jitted code which in specific cases and with read-only memory for jitted code can actually fail, especially in an enterprise scenario.

@ENikS
Copy link
Author

ENikS commented Nov 29, 2017

I see. Thanks for the info.

@ENikS ENikS closed this as completed Nov 29, 2017
@ENikS
Copy link
Author

ENikS commented Dec 1, 2017

I really like the idea of changing behavior of methods without adding proxy type around the instance.
How difficult would it be to create reliable mechanism to do it consistently? Since Roslyn is Open Source now perhaps there could be some hooks that could be used?
Could we do something as Debugger does, inject jump code before method is executed?

It does not have to be compatible with existing Unity code. It could be added as alternative mechanism if required.

@ENikS ENikS reopened this Dec 1, 2017
@pardeike
Copy link
Owner

pardeike commented Dec 1, 2017

I think you should start your own project. What you want to do is out of the scope of this project and I think there are already libraries out there that do that on the dll level.

@ENikS
Copy link
Author

ENikS commented Dec 1, 2017

Could you point me to these? I just recently started with these and still lucking necessary depth.

@pardeike
Copy link
Owner

pardeike commented Dec 1, 2017

@pardeike pardeike closed this as completed Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants