We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当我将一个脚本挂载到特定Textmesh Pro上时(其余的不会导致这个问题),会导致微信转换的小游戏所有的脚本失效,所有挂载的脚本不再工作,在我的场景中只有特定两个TMP挂载脚本会导致转换的小游戏脚本失效。
以下是我挂载的脚本,用于监听GameSystem发出的调用WX.getWXFont()方法产生回调所更新字体的事件。
private void Awake() { GameSystem.Instance.onUpdateFont += onFontUpdate; } private void onFontUpdate(Font font) { WX.WriteLog("字体更新"); TextMeshProUGUI text = GetComponent<TextMeshProUGUI>(); TMP_FontAsset tmpFont = TMP_FontAsset.CreateFontAsset(font); text.font = tmpFont; }
这是我在GameSystem中更新字体的方法,此方法在initSDK的回调中调用,initSDK在awake中调用
private void initFont() { WX.WriteLog("开始初始化字体"); WX.GetWXFont(fontFallback, (font) => { GameFont = font; WX.WriteLog("字体初始化成功 当前有:" + onUpdateFont.GetInvocationList().Length); onUpdateFont?.Invoke(GameFont); //TODO temporary debugPanel.updateFont(GameFont); }); }
@#911 (comment) 此issue和本issue同时发生
Windows11/2022.3.14f1c1/minigame.202411141147/PackageManager Git/WebGL 测试平台Android,机型Redmi K70, Wechat Ver.8.0.53
The text was updated successfully, but these errors were encountered:
我的问题
Sorry, something went wrong.
No branches or pull requests
描述Bug
当我将一个脚本挂载到特定Textmesh Pro上时(其余的不会导致这个问题),会导致微信转换的小游戏所有的脚本失效,所有挂载的脚本不再工作,在我的场景中只有特定两个TMP挂载脚本会导致转换的小游戏脚本失效。
以下是我挂载的脚本,用于监听GameSystem发出的调用WX.getWXFont()方法产生回调所更新字体的事件。
这是我在GameSystem中更新字体的方法,此方法在initSDK的回调中调用,initSDK在awake中调用
@#911 (comment)
此issue和本issue同时发生
运行环境
The text was updated successfully, but these errors were encountered: