Today we are going to discuss about the performance issue with unity.
Unity always has issue with game optimizations and performance, because if you are targeting small mobile devices like Android and iOS then you must be very careful about the memory and performance of the game.
Here are some tips which you can take care while developing.
1. Static Batching:- Batching is totally depends on the Draw calls. If you are using Static batching then you can save a lot of CPU cycles. In the static batching it is necessary that no calls for the CUP or GUP so that your game can run fast.
You can click on the above mentioned check box to make any object as static object.
2. Dynamic Batching:- Dynamic batching is just opposite from this. This is not which you need to select. All the objects which are not static that means they are Dynamic. To use the Dynamic batching you need to use as small objects with as possible as small vertices.
Without click mean Dynamic batching.
3. Sounds :- Sounds also play a major role in the performance. If you using pre-load sounds then all sounds will already loaded in the memory that can decrease the performance of your game. If you are loading sounds on run time than again that can show lag in your game.
So deciding which sound need to load what time is very necessary.
Here you can check the loaded assets in your game.
Try this and optimize your game very well. Till then keep coding.