- Home /
Movie Texture running choppy every few seconds
Hello! I made a simple 2D Pong in Unity and I wanted to put an animated background to it. I noticed that the animated background tends to run choppy every few seconds. Basically it looks as if your FPS dropped while playing. I checked the FPS and it's 60-120 so that isn't the issue. The video is only 14 seconds long and keeps looping. The file is 7MB and in .OGG format. It plays completely smooth in any video player. The movie texture is attached to a Mesh Renderer and I use the following script to play and loop it:
var movTexture : MovieTexture;
function Start () {
movTexture.loop = true;
renderer.material.mainTexture = movTexture;
movTexture.Play();
}
You can also download the game from here and see the how the background runs: https://mega.co.nz/#!lJw1SBCJ!XuBcRSZxuUbIhklFgMroqIn2yWFEfpZmp1S7ss00bh4
Anyone knows how to make it play smooth as it does in the video player?