Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

2.0版本加载报错 #58

Open
czy128518 opened this issue Sep 26, 2018 · 4 comments
Open

2.0版本加载报错 #58

czy128518 opened this issue Sep 26, 2018 · 4 comments

Comments

@czy128518
Copy link

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

@shipunyc
Copy link

给你个土办法:

用记事本打开 laya.physics3D.js, 修改memorySize = 你想要的内存M数 * 1024 * 1024;

@Veinin
Copy link

Veinin commented Oct 13, 2018

@shipunyc laya.physics3D.js并没有memorySize可改,请问这是什么原因,我也遇到了。

@shipunyc
Copy link

@Veinin 有的啊。你找个工具把这个文件修正一下格式,第一行就是memorySize.

原因就是内存不够用了,默认的内存只有16M。。。Laya里的3D scene默认是打开PhysicsSimulation的。3D模型里的Collider越多,越消耗内存。

我改到了100M。

@Veinin
Copy link

Veinin commented Oct 16, 2018

@shipunyc 已手动修改,改大内存后,没有再出现上面问题,感谢分享!

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

No branches or pull requests

3 participants