Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 2d Performance on Windows Phone 8

Discussion in 'Scripting' started by alexbb, Oct 27, 2014.

  1. alexbb

    alexbb

    Joined:
    Oct 27, 2014
    Posts:
    3
    Hey everyone,
    I have created a few small games using unity for windows phone( just one scene , few gameobjects and little scripting ). I have a Lumia 1520 which i use for testing. My problem is that every and each one of my games heats up the phone like creazy, which in turn drains the battery real quick.

    Even when I am running a completly empty game scene the phone is warm. In fact its quite a bit warmer than when I am running "Fast Ball 2" which you can find in the Windows Store.

    My question is: Is Unity really that resource draning? In my latest game i dont even use any physics components(just yet), only some colliders and using Mouseinput to detect if the user is trying to interact with them.
     
  2. VSZM

    VSZM

    Joined:
    Nov 18, 2013
    Posts:
    8
    Is this the case with release builds as well or only with debug?
     
  3. alexbb

    alexbb

    Joined:
    Oct 27, 2014
    Posts:
    3
    Well if Im honest, im not entirely sure how release builds are set up since im just developing for myself. But when i build for windows phone i noticed there is a tick saying "development build" and most of the time i make sure thats ticked off because i know there is a certain overhead if you allow for a "development build". but I am not entirely sure that sets everything up in release mode.

    Should i mention i also have similar issues when i try to run 3d games on my phone from windows store but i guess thats expected since there is a lot hapenning on the screen. I also get random framedrops with most 3d games (whatever i done in unity runs well but still heats up the phone)

    Most 2d games (from Windows Store) on the other hand seem to run very well, i mean the 1520 used to be the flagship model for Nokia and it still is a very nice phone it should run this stuff pretty easy.(windows phone 8.1 runs very smooth most of the time).

    Only two reasons i can think of:
    1) Something might be wrong with the videoprocessor in my phone
    2) Unity requires a lot of resources

    FYI .. i tried to replicate "Fastball 2" for in unity. But i didnt want to go through all the bother of makeing the individual levels since it was just a learning exercise so i set up some ground generation. Constructed the ground in front and as a my character/ball was moving forward the ground was shifting from the end to the front, .i.e i was reusing my assets but placing them diffrently this time. to achieve that i was abusing quite a lot of Random.Range(x,y).

    Anyway i had some nice thoughts for that but when i noticed that my phone feels like a boling kettle when i ran it i got dissapointed. I tried caching some more stuff in the hopes that it would fix it but with no avail...

    I scraped that and started something much simpler and i still bump into this problem ....
     
  4. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906
    I'm not sure with wp8 and your project setup, but sounds like unity is set to run freely as fast as possible.
    I don't like to suggest this, but try lowering your target framerate to 30 and see if that helps.
     
  5. alexbb

    alexbb

    Joined:
    Oct 27, 2014
    Posts:
    3
    Thanks for the suggestions,i will try that but I am not terribly keen on it either,

    I am interested to find out if people have similar problems on Windows Phone 8.1 or similar devices or maybe the problem is simply my phone