Studdering on android just moving a transform?
I am having big problems with "studdering" on my android device, my game seems to drop to a lower frame rate every few seconds which is horrible for my fast paced 2d platform game. Everything seems to be fine in the profiler so I tried to make the most simple game ever and run it on my device - A samsung galaxy 3s mini. The game has only 1 scene with only a camera and a single GameObject to which I have attached a sprite renderer with a simple red square sprite. I have attached this C-sharp script to the gameobject making it move across the screen.
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Character : MonoBehaviour {
// Use this for initialization
void Start ()
{
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = 60;
}
// Update is called once per frame
void Update ()
{
transform.Translate (Vector2.right * 10 * Time.deltaTime);
}
void OnBecameInvisible()
{
transform.position = new Vector2 (0, 0);
}
}
Even this very very simple project causes "studdering" or hiccups on my android phone. This is extremely frustrating for me and I do not understand why. I can play other simple games like "Flappy Bird" without any problems what so ever. I am starting to think that Unity just can't build a smooth running APK file but surely that can't be the case as Unity should be one of the top softwares for creating games.
Are there some key settings that I have to change in order for my project to run smoothly? Please share your knowledge and help out a very frustrated developer finish his first game made in Unity.
Your answer
Follow this Question
Related Questions
How should I fix the post processing framerate 0 Answers
Strange framerate problem 0 Answers
SureFire way to stop Multitouch ? 2 Answers
Mobile VR Framerate Problem 1 Answer
How do I prevent Apple TV from reducing frame rate after a while? 0 Answers