1
Support / Scene Slows down to a crawl after a while
« on: October 08, 2013, 06:02:30 pm »
Hello,
I am working on a small endless 2d runner. In the background I have 2-3 layers with hills. These hills get created offscreen as a prefab (clone) to the right and then slide in throughout the scene. When they reach a certain point off the screen to the left I call Destroy(this.gameobject); I can see it being destroyed. Everything looks good. After about 2-3 minutes into the game everything begins to slow down to a crawl on my iphone 5. The game starts rendering slower and slower. My first gut feeling tells me I have a memory leak. Am I doing something wrong? Is there another way of destroying the objects?
On another note when I create collections and commit my png's I get an error that it will leak memory, but the collection is fine. I assumed this might be just in Unity or is fine.
Thank you for any input. If you require any other information I can provide let me know.
I am working on a small endless 2d runner. In the background I have 2-3 layers with hills. These hills get created offscreen as a prefab (clone) to the right and then slide in throughout the scene. When they reach a certain point off the screen to the left I call Destroy(this.gameobject); I can see it being destroyed. Everything looks good. After about 2-3 minutes into the game everything begins to slow down to a crawl on my iphone 5. The game starts rendering slower and slower. My first gut feeling tells me I have a memory leak. Am I doing something wrong? Is there another way of destroying the objects?
On another note when I create collections and commit my png's I get an error that it will leak memory, but the collection is fine. I assumed this might be just in Unity or is fine.
Thank you for any input. If you require any other information I can provide let me know.