Hello all!
Wanted to see if any1 could help,
i created a clicker game on unity, and posted it on steam.
My game after some idle time like 6 hours, just crashes the game and steam.
The logs dont give me an error, or anything telling what went wrong.
how can i try to fix this issue? any hints?
thanks in advance!
Monitor memory allocated by your game over this time frame. If it slowly but constantly grows then this is a problem that can surely cause this - at some point the system runs out of memory and terminates it.
In addition, the simplest way to control the memory:
- Check “Use incremental CG” in the Player Settings flag.
- During the Game Session, regularly Clear the references to all unused objects in the code,
like reference = null;
in all variables where the objects appeared.
- I guess that clicker game creates many objects at runtime, so use Object Pool pattern to control the allocated memory by avoiding creating new object every time.
Hello,
Thanks a lot for the help, and the solutions
I managed to fix it, it was a wrong use of BigInteger that was destroying the game.
Again thanks, and have a great weekend