Search Unity

How come my FPS drop in surface pro??

Discussion in 'Scripting' started by Eco-Editor, Jun 17, 2019.

  1. Eco-Editor

    Eco-Editor

    Joined:
    Jun 29, 2016
    Posts:
    71
    After searching the planet of google, I can't understand why my FPS is dropping.

    I'm developing a game for Surface pro, using the UWP platform.
    I have a huge frame rate drop on Surface pro. After following this post:
    https://forum.unity.com/threads/uwp-lower-framerate-than-standalone-slower-fps-than-exe.501892/

    I've looked into the resolution of the app.The optimized resolution on the tablet is: width: 3240, height: 2160
    I've setup this resolution in code but its being ignored or changed based on the target machine.

    This is my code:
    Code (CSharp):
    1.     private void Start()
    2.     {
    3.         Application.targetFrameRate = 300;
    4.         //Screen.SetResolution(1920, 1080, true);
    5.         Screen.SetResolution(3240, 2160, true);
    6.         screenResolution.text = "Screen resolution : " + Screen.currentResolution.ToString() + "Screen Width : " + Screen.width + "Screen Height : " + Screen.height;
    7.         targetFrameRate.text = Application.targetFrameRate.ToString();
    8.         Debug.Log(Screen.currentResolution);
    9.     }
    In the pictures, the number 300 indicates target frame rate.
    This is how it looks in the editor:
    upload_2019-6-17_20-47-31.png

    This is how it looks in the visual studio build on pc:
    upload_2019-6-17_21-5-56.png


    This is how it looks on surfacePro:
    upload_2019-6-17_21-26-53.png

    So I see resolution script only works correctly (except for the height) in the build. Is that how its supposed to be?

    As you can see the scene is very simple. How come the frame rate drops??
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    The only way to answer this is to attach the profiler to your running target and start investigating.
     
  3. WallaceT_MFM

    WallaceT_MFM

    Joined:
    Sep 25, 2017
    Posts:
    394
    Hmm, that is a very high resolution for a tablet I think. I also notice you are doing the opposite of what the linked thread suggested. They scaled the resolution down from the tablet's native, but you are trying to run at its max resolution. Are you sure your tablet can handle that load?
     
  4. Eco-Editor

    Eco-Editor

    Joined:
    Jun 29, 2016
    Posts:
    71
    How do I attach a profiler to an app on a surface pro tablet?
    I saw this documentation, https://docs.unity3d.com/Manual/windowsstore-profiler.html
    but it's not clear enough
     
    Last edited: Jun 18, 2019