You can see there is 12 mesh in my game.
The game will start when I click the start button,and what we need to notice is this.
After the game start,the deleteRoad function will be excuted.
The roadArr is a object pool which is excuted after the script preload.
Then,if I click the start button,you will see the mesh becomes more than before.
Every time I click the start button, the mesh will become 15.
I think it is so strange.
So I do some test,I found if I cancel the entity.destroy() just like this:
Then every thing is normal.
You can see there is 12 mesh in my game after click the start button.
So,I want to know why it is so strange?
Why I destroy entity will add more mesh instance?
This is my project which I fork one for debug:
https://playcanvas.com/project/430851/overview/problem
The main js is in the road.js.