You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed some recent activity on these repos so I'm going to shoot my shot.
I am upgrading some code (that's an understatement) from Unity 3 to Unity 5 and have encountered what is either a bug or a significant behavioral difference regarding interception between the versions.
In Unity 5.11 (and likely earlier versions, I haven't explored deep enough to find where the issue starts), Unity will re-resolve objects registered with the "PerResolveLifetimeManager" when resolving objects needed for any defined interception behavior. I have verified that the same object will be used across the object graph for any reference that is not part of interception behavior.
Here is a test case that should demonstrate the issue. I tried another lifetime ("PerThread") to demonstrate that it does seem to specifically be an issue with "PerResolve".
I've pulled the interception repo and have been trying to uncover the issue, but I'm quite a bit out of my depth. Depending on the scope of the fix (I would have to evaluate fixing this vs other options for my team to consider), I'd be willing to submit a PR if I can get pointed in the right direction.
The text was updated successfully, but these errors were encountered:
MikeCook9994
changed the title
The "PerResolve" lifetime is not properly respected when the resolving interception behaviors for an object.
The "PerResolve" lifetime is not properly respected when the resolving interception behaviors for an object
Apr 25, 2023
I've noticed some recent activity on these repos so I'm going to shoot my shot.
I am upgrading some code (that's an understatement) from Unity 3 to Unity 5 and have encountered what is either a bug or a significant behavioral difference regarding interception between the versions.
In Unity 5.11 (and likely earlier versions, I haven't explored deep enough to find where the issue starts), Unity will re-resolve objects registered with the "PerResolveLifetimeManager" when resolving objects needed for any defined interception behavior. I have verified that the same object will be used across the object graph for any reference that is not part of interception behavior.
Here is a test case that should demonstrate the issue. I tried another lifetime ("PerThread") to demonstrate that it does seem to specifically be an issue with "PerResolve".
UnityPerResolveInterceptionBrokenPoc.zip
I've pulled the interception repo and have been trying to uncover the issue, but I'm quite a bit out of my depth. Depending on the scope of the fix (I would have to evaluate fixing this vs other options for my team to consider), I'd be willing to submit a PR if I can get pointed in the right direction.
The text was updated successfully, but these errors were encountered: