Hi Playmaker,
This might not be a playmaker question in general, but this community is so great, I thouht I would ask it here. I posted a problem with optimization some time ago on the forum which I have been working on since then.
Link to old thread.
Game:It's a endless runner, in 2d, with a lot of stuff comming towards you. See attached screenshot.
The problem:The first game you play lags. Not horrible, but a little bit all the time.
The game lags a lot on Iphone 4. On Iphone 5 it runs smooth after the first game.
In the profile thing, I can see that activate game object takes a lof of power in the beginning
Setup:I use three different pools for, Ammo, Enemies, Props (Coins etc). The environment is using eight different platforms, where two are shown at the same time, I activate it when I need to use a platform. There is three background planes and four midtground.
I read that unity takes more effort when it shows a game object for the first time. So maybe thats what causing it?
I use 3d physics, these take more effort than 2d physics, I only used them because this is new to me, and I didn't know better. I could change it to 2d but it would take a while, and if it didn't help it would be waste of time.
I use a lot of trigger events, and I use some global events. How bad are these? I have 2 environment modules showing at once each with about 20-30 placeholder (Just a box with a trigger) objects waiting to be triggered. I use to have a lot of every frame checks but I got rid of most of them.
We are going to publish this game soon, so any inputs are very welcome.
Thank you.
/Dennis