1

So I decided to finally put Unity Ads on my Android game. I tried to build it on Windows platform and found no problem (FPS is fine) But when I rebuilt it for Android, my FPS scaled down to 30+, what just happened? I didn't put anything but integrating the Unity Ads so this time I just comment out the Ads that initializes the ads.

void InitializeAds(){
    StartCoroutine(ShowAdWhenReady());
}


IEnumerator ShowAdWhenReady(){
    while(!Advertisement.IsReady()){
        yield return null;
    }
    Advertisement.Show();
}

In hopes that the FPS will go back to normal. But heck when I recompiled the APK and installed it on my phone the FPS still around 30+ FPS :/

Any help regarding this? I'm certain my game has good frame rate before I put the ads so I know there must be some kind of bugs on the plugin.

By the way, I invoked the InitializedAds on the Start method.

Thanks!

UPDATE:

I installed Unity Remote from Google Play to see if it's also going to have same low FPS but its NORMAL. So I recompiled the current Unity project, installed on my phone, FPS still SUCKS. This is so straaange T.T

Jim
  • 1,027
  • 1
  • 10
  • 19
  • 30+ is pretty good for mobile devices. No panic. :) – David Oct 16 '15 at 02:50
  • But I can literally see now the chugging of my game play. It's a racing game and you can see that my players are snapping. Any person that would play my game would probably uninstall it the first they see the animations sucks :/ – Jim Oct 16 '15 at 02:52
  • If you are sure that the FPS is 30+, you generally will not see such chunky issues. See this [Link](http://30vs60.com/) to see if you can detect any difference in 30 vs 60 fps. – David Oct 16 '15 at 02:53
  • Well I'm not entirely sure (sorry about that) but this time you can literally see and notice how my players move. It's really FLICKING. – Jim Oct 16 '15 at 02:56
  • Before, it was smooth, players run smoothly. GUI animations are smooth as well. – Jim Oct 16 '15 at 02:56
  • Your head aches, but you said it hurts in your feet. Make sure the FPS is the culprit first. Good luck. – David Oct 16 '15 at 02:57
  • You might try disable the Pixel Perfet in your camera settings. See this [link](http://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/) We significantly improved the UX by doing so. – David Oct 16 '15 at 02:59
  • no im not using any scripts on my camera. the issue is before i put the ads, my fps was fine. after i put it, fps went down. now that i put it away, the fps didnt go back to normal i didnt change anything regarding the performance on my game – Jim Oct 16 '15 at 03:06
  • it is irrelevant. Whether you use script or not, you have a pixel perfect setting for your canvas. – David Oct 16 '15 at 03:08
  • Seems to me you never actually ran your game on your device until now, ads or not. Are your movement and animations bound to a _function of elapsed time since last update_ or do you just hardcode movement deltas?. You should be doing the former –  Oct 16 '15 at 04:32
  • Hi Micky, I'm sorry I didn't completely get what you meant by bound to a function of elapsed time since last update. All my movements are done thru `Update` function with `Time.deltaTime` multiplied. As I said earlier my game was running smooth before the Ads. After I integrated it, and reinstall the app, it's running with low FPS. So I ditched out the Unity Ads to see if that was the prob. But now its still running low even w/o Unity Ads – Jim Oct 16 '15 at 05:34
  • 1
    Have you tried forcing the game to run at 30fps? Our racer used to chug and that was down to inconsistent fps not low fps, once we lowered the frame cap it was a much smoother experience for the player – David Long Oct 16 '15 at 06:51

1 Answers1

0

Please try this for making FPS higher in your game,

Application.targetFrameRate = 60;

I guess, your problem will solved using this line.

Sudhir Kotila
  • 687
  • 9
  • 20
  • Hi, though this is an old one, I finally figured out why - the updates of Unity Editor had it made the FPS scaled down. Anyway thankyou for your answer! – Jim May 17 '16 at 02:18