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

[Unity] Bug: 安卓平台xil2cpp 简单加法和乘法运算之后出现inf的问题 #1604

Open
3 tasks done
XYDXYD opened this issue Nov 22, 2023 · 2 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working Unity

Comments

@XYDXYD
Copy link

XYDXYD commented Nov 22, 2023

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.0.3

Unity的版本 | Unity Version

2021.2.6

发生在哪个平台 | Platform

Android

错误信息 | Error Message

如图所示定义c#的扩展函数:
image

image

运行下面的ts代码。

1700659424963_DDC6950F-30D6-4345-A8FC-1F4DDE402ACF

输出如下:
1700659413043_A63E9EB7-CA43-4b6f-9FE6-695AFA12A902

其中delta time的值正常。 把input从vec2改成vec3跑了几次也正常,但不排除是因为非必现。

另外还有个问题是,如果new UnityEngine.Vector3()无参,创建出来的向量里面的值是随机未定义的

问题重现 | Bug reproduce

如上

@XYDXYD XYDXYD added bug Something isn't working Unity labels Nov 22, 2023
@XYDXYD XYDXYD changed the title [Unity] Bug: 简单加法和乘法运算之后出现inf的问题 [Unity] Bug: 安卓平台xil2cpp 简单加法和乘法运算之后出现inf的问题 Nov 22, 2023
@chexiongsheng
Copy link
Collaborator

值类型无参构造那要加个memset吧

@chexiongsheng
Copy link
Collaborator

值类型无参构造字段随机的问题合入这个commit:
28b0285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Unity
Projects
None yet
Development

No branches or pull requests

3 participants