Skip to content

Conversation

@UlyssesWu
Copy link

@UlyssesWu UlyssesWu commented Jul 8, 2025

This PR fixes #149 .

event Action iFix;

[IFix.Patch]
public void Test() {
	Action bug = () => Debug.Log("Full of bugs");
	iFix += bug;
}

Expect:
Nothing was wrong.

Actual:
ExecutionEngineException: Attempting to call method 'System.Threading.Interlocked::CompareExchange<...>' for which no ahead of time (AOT) code was generated.

Wrong explaination:
image

Correct explaination:
image

By using, referring or merging this pull request, you understand and agree that the copyright or patent license of this pull request and its code will not be granted to Tencent.

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

热更成功,但有个方法Patch会报错(报错的方法里面调用了一个带有ref参数的event的注册回调的操作)

2 participants