Search Unity

CPU usage in background

Discussion in 'macOS' started by seven_, Dec 21, 2018.

  1. seven_

    seven_

    Joined:
    Sep 30, 2014
    Posts:
    42
    Hi,

    is it normal that a MacOS build is consuming around 25% CPU time even if in background? We have unchecked "Run In Background" (with it being checked, the load is obviously much higher).
    The problem occurs in 2018.3 (it already did in 2018.2, earlier versions unknown). It happens for both Mono and IL2CPP builds.
    We have created a new project with merely a button on a Canvas for testing.
    Does anyone have any ideas or insights?
    Thanks!
     
    Last edited: Dec 22, 2018
    nikonovdk likes this.
  2. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    I'd recommend lowering the frame rate. Application.targetFramerate = 15.
     
  3. seven_

    seven_

    Joined:
    Sep 30, 2014
    Posts:
    42
    Yeap. This seems a simple but working hack to reduce the framerate on pause and reset it on unpause! I did not think of it before. Thanks.
    The bug only seems to exist on MacOS builds, and not for iOS, Android, and Windows. Do you have any insights, e.g., is the "Run in Background" switch not working or is this just one of the heaps of Mac issues that Unity does not seem to care about for months (and sometimes years)?
     
    nikonovdk likes this.