Reputation: 45
I recently finished my first android game using Unity 3D and C#.
I noticed that whenever the game is running and my phone gets a notification (I am using a samsung galaxy core phone) the game slows down, skips a couple of frames and continues working. This frame skip breaks the gameplay and I need to address this thing right away.
Any ideas why this is and how I should avoid it? I have been using Time.deltaTime whenever I needed to make position changes and I am using the Unity built in physics engine.
Upvotes: 1
Views: 337
Reputation: 1666
This is something I have noticed while developing on lower-end devices. Every time the phone starts doing something else on the background than running the game e.g fetching emails or updating software it does a FPS hiccup.
I found no solution for this, except for making the game run more optimized overall to minimize the FPS valley.
Upvotes: 0
Reputation: 11933
You should use FixedUpdate
instead of Update
when dealing with physics. This way, your physics won't be affected by the performance of the machine.
Upvotes: 1