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

GameEntry.BuiltinData.InitBuildInfo()加载失败 #30

Open
XiaoQiCoding opened this issue Oct 14, 2024 · 0 comments
Open

GameEntry.BuiltinData.InitBuildInfo()加载失败 #30

XiaoQiCoding opened this issue Oct 14, 2024 · 0 comments

Comments

@XiaoQiCoding
Copy link

看了下这里的加载,其中:
m_BuildInfo = Utility.Json.ToObject(m_BuildInfoTextAsset.text);
使用的 DefaultJsonHelper.ToObject
最底层使用的是:JsonUtility.FromJson(json)
JsonUtility是有不少限制的,其中反序列化的目标类型: BuildInfo,这些属性全部用的类似下面这种方式:
public string GameVersion { get; set; }
这样会导致反序列化失败,这些参数都是null。
应该修改这个类为:
public class BuildInfo { public string GameVersion; public int InternalGameVersion; public string CheckVersionUrl; public string WindowsAppUrl; public string MacOSAppUrl; public string IOSAppUrl; public string AndroidAppUrl; }

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