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

在async方法下使用字典TryGetValue out 一个继承主工程的类型,返回值错误的设为适配器类型 #759

Open
827922094 opened this issue Jun 16, 2023 · 0 comments

Comments

@827922094
Copy link

在async下使用字典TryGetValue out一个继承主工程类型的对象,返回值异常


static async void Test()
{
Dictionary<string, SingleRankingItem> keyValuePairs = new
Dictionary<string, SingleRankingItem>();
keyValuePairs.Add("95",new SingleRankingItem ());
if (keyValuePairs.TryGetValue("95", out SingleRankingItem value))
{
UnityEngine.Debug.LogError(value.GetType().FullName);
}
}

这里应该返回的是SingleRankingItem 对象,但是却返回了XXXX.Adapter

Unity Version
2021.3.15f1

ILRuntime Version
2.0.2

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

1 participant