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

Action委托特殊情况下 ILRuntime与AOT结果不一致 #723

Open
corinegy opened this issue Jul 27, 2022 · 1 comment
Open

Action委托特殊情况下 ILRuntime与AOT结果不一致 #723

corinegy opened this issue Jul 27, 2022 · 1 comment

Comments

@corinegy
Copy link

corinegy commented Jul 27, 2022

Describe the bug
Action委托特殊情况下 ILRuntime与AOT结果不一致

To Reproduce
public static System.Action EventOn;

public static void FunTest4()
{
    Debug.Log("FunTest4");
}

public static void FunTest3()
{
    Debug.Log("FunTest3");
}

public static void FunTest2()
{
    EventOn += FunTest4;
}

public static void FunTest()
{
    EventOn += FunTest2;
    EventOn += FunTest3;
    EventOn();
}

Expected behavior

执行 FunTest()
AOT下的log: FunTest3
ILRuntime下的log: FunTest3 FunTest4

Unity Version
2020.3.29

ILRuntime Version
2.0.2 (Master)

image

@liiir1985
Copy link
Collaborator

原理原因短时间无法解决,虽然的确有不一致不过这样的用法也确实不大推荐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants