Search Unity

Unity 5 Performance problems with WP8.1 and Universal project

Discussion in 'Windows' started by Freeubi, Jan 2, 2016.

  1. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    I spend the last few days to find out whats the problem with our 2D project.
    It runs perfectly on Windows10 PC(smooth 60fps), but horrible (10-15fps) on WP10 or WP8.1.
    I tried on 2 mobile, L630 and L820, both wrong.

    I read the forum and i find out that the 8.0 silverlight project is ok.
    Any update on this problem? The WP8.0 is pretty deprecated...
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Do you run Debug configuration? It is very slow, use it only for debugging code.
     
  3. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    No, i'm on master config. Also tried creating the appx and install from that - with the same result.
    If i build with an older version of unity to wp8 silverlight then the speed is ok.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    What is your test device? What Unity version are you on? Did you try using the profiler to pinpoint the "slow place".
     
  5. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    I tried on emulator, L630 and l820, both fresh install.
    Also tried a few version of unity (5.3.1, 5.2.4, 5.1.2), final and patch release also.
    The profiler dont say anything, the memory and the cpu usage below 40%.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    "Profiler don't say anything" - could you elaborate?
     
  7. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    "The memory and the cpu usage below 40%" is not enough?
    Its working on silverlight, and its not only on my project - check the forum.

    Currenlty i'm working but i can provide more info in the next 6 hours.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Of course it's not enough, I'm not a seer. I don't know what's going on inside your project. Do you even know if you're GPU or CPU bound?
     
  9. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    Its CPU bound, here is the profiler:
     

    Attached Files:

  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Behaviour.Update is your update function on your scripts. Are you doing something extremely expensive in any of them? It doesn't seem like you're calling into engine to do much, so I'm guessing most of the execution time is spent executing your C#.
     
  11. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    there are some bone animation and tap check. Nothing expensive - currently I removed most of the content and changed the texture size - still 3fps.

    the problem is clearly with the unity because it works with Silverlight build in 60fps
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Can you PM a repro of this issue to me? I could give a quick look tomorrow morning.
     
  13. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    yeah, i upload it somewhere.
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    For anyone else that's wondering whether this was something Unity side: I looked into his project today.

    Basically, don't do GameObject.Find and then query they're names in a loop in your Update functions. That destroys performance on mobile. Who would have thought?
     
  15. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    Removed the entire function. Better but still only 8fps.

    How can it work all the low end android, ios and winphone silverlight perfect, and not here? Thats why i'm saying the problem is with the build, not the script.