Search Unity

Any tips for Optimising non game apps

Discussion in 'General Discussion' started by N_Murray, Jun 20, 2019.

  1. N_Murray

    N_Murray

    Joined:
    Apr 1, 2015
    Posts:
    98
    As the title says I'm wondering if anyone of you have any tips for optimising builds for non game related apps. Im currently looking into the best way to strip the physics engine from the build as I can imagine that would make things a little more lightweight.
    Oh and I know there is much better ways ways of building non game apps however I know Unity and I'm only interested in making small personal apps so I'm not interested in learning another ide.
    So any tips? I'm sure some other people have done the same thing so what have you found useful?
     
  2. MrArcher

    MrArcher

    Joined:
    Feb 27, 2014
    Posts:
    106
    If you're using 2017.2 or later, you can disable various engine modules using the Package Manager. On the upper left, select built-in packages and disable physics from there.

     
    BonneCW, ikazrima, TonyLi and 2 others like this.
  3. N_Murray

    N_Murray

    Joined:
    Apr 1, 2015
    Posts:
    98
    I didn't realise it was that simple with the package manager. I still haven't really looked into some of the newer unity features. Thanks for that, any more hints and tips more than welcome
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Removing packages that you're not using, while satisfying for tidiness fans, probably won't give you the biggest bang for the buck in performance. I recommend using the Profiler to identify the actual bottlenecks. (See Understanding optimization in Unity)
     
    N_Murray likes this.
  5. N_Murray

    N_Murray

    Joined:
    Apr 1, 2015
    Posts:
    98
    Some very useful information there, I'll bookmark that
     
  6. BonneCW

    BonneCW

    Joined:
    Jan 22, 2017
    Posts:
    123
    That's great, didn't notice that yet. Directly removed some stuff from some projects, saves at least a little space :D
    But I guess you meant 2018.2+ when they introduced the package manager.
     
  7. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    If you use IL2CPP, stuff that is not used will get stripped in case you've ticked 'Strip Engine Code' in project settings.

    In general its worth going through and looking at project settings you're using.
    Libs are those things that takes space in empty projects. So make sure you're got a build pipeline (e.g. armv7 vs arm64) that builds separate builds based on the architecture and platform.
     
    Last edited: Jun 22, 2019
    N_Murray likes this.
  8. SmartMediaNL

    SmartMediaNL

    Joined:
    Sep 29, 2016
    Posts:
    77
    As an application can be active a long time i found out that it drained the phone batteries. So what i did was limiting the frame rate to 10fps in idle mode and after receiving an input event turn it back to 30fps.
     
    N_Murray and Ony like this.
  9. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Using DOTS and Burst compiler to optimise your apps usage of multi-core SIMD hardware.