2D Toolkit Forum
2D Toolkit => Support => Topic started by: Dipanker on October 09, 2013, 08:19:34 am
-
Hi
I want to know that is there any other way to load large image/sprite in the game, for eg. Candy Crush saga there is large map in before game play. What I did is I divided the image (around 6) and loaded in different sprite collection (1sprite for 1image) and used as map in my game, it works fine but when I come back to particular scene its take lots of time to load.
Sorry to ask, I have another question that is there a way to release memory before loading to another scene, coz when I switch to another scene sometimes it loads but sometime it crashes.
Thank you.
-
Loading time isn't something you can optimize directly - however, you could try using the async load functions to load in the background. You'll still get a pause at some point, but it won't be as bad as directly loading it.
You can try calling UnloadUnusedAssets before loading another scene, but if you're getting occasional crashes, it could be because of any number of things - eg. out of mono memory, etc. You need to identify why its crashing - eg. what memory its running out of, before trying to fix this.
-
Hi
In XCode output message is show as below:
Received memory warning.
WARNING -> applicationDidReceiveMemoryWarning()
-
Yeah, but that could mean anything. YOu need to profile your apps memory usage, and profile the unity memory usage to narrow it down.