Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Adaptive Performance Package

Discussion in 'Android' started by David-Berger, Mar 28, 2019.

  1. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We released Adaptive Performance and Samsung Android 2.0.0 Preview 11 today which comes with many fixes and updates to the Indexer and Scalers. Please read the changelog below for details. The installation in Adaptive Performance 2.0 is different to 1.0 due to the new provider system. Please see the quick installation guide below. Changes in Adaptive Performance 2.0:
    • Samples to show off different Adaptive Performance features.
    • Settings for Scalers
    • A number of sample Scalers
      • Adaptive Sorting
      • Adaptive Batching
      • Adaptive Shadowmap Resolution
      • Adaptive Shadow Distance
      • Adaptive Shadow Quality
      • Adaptive Shadow Cascades
      • Adaptive LOD
      • Adaptive MSAA
    • Fixes to VRR support.
    Quick Installation Guide:

    • Install Android Support for Unity. Unity needs Android Support to build to your Samsung device.
    • Switch Platform to Android in the Build Settings window.
    • Use the Unity Package Manager and install the Adaptive Performance
    • Install and activate the Adaptive Performance Samsung Android provider in Adaptive Performance Settings.
    • If you want to use the Device Simulator Extension, you also have to activate the Adaptive Performance Simulator provider in the Adaptive Performance Settings.
    Please also read the Installation Guide in the manual, which has additional details.
     
  2. yuliyF

    yuliyF

    Joined:
    Nov 15, 2012
    Posts:
    163
    Will it work on Huawei and other brands?
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    Not at this moment with the shipped providers.
     
  4. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We released Adaptive Performance and Samsung Android 1.1.9 and 1.2.0 today which comes with bug fixes, dependency changes and updates. Please read the changelog for details. 1.1.9 and 1.2.0 have the following fixes:
    • Automatic Performance Mode: lower CPU and GPU levels at the same time instead of one at a time to increase efficiency and higher power savings.
    • Fixed Automatic Performance Control flag to respect the function and not be read only anymore.
    • Thermal Mitigation Logic changes in GameSDK 3.2 and it was updated in SetFreqLevels() to react to the correct return values.
    • Automatic Performance Mode: gpuUtilizationThreshold increased from 0.7 to 0.9 to increase effeciency.
    • Automatic Performance Mode: gpuFactor increased from 0.72 to 0.92 to increase effeciency.
    • Automatic Performance Mode: Increase GPU Active time Ratio.
    • Changed Documentation to make clear that changing CPU and GPU levels is risky and the Automatic Performance Mode should be used instead.
    • Exchanged GameSDK wrapper with updated version removing GameSDK 3.1 support.
    • Automatic Performance Control does not lower CPU lower than 1 on GameSDK 3.2 workaround.
    • Add workaround to send temperature warning when the device starts as warm already as currently no events are sent.
    1.2.0 has the same changes as 1.1.9 but it also updates a dependency: The Subsystem Registration was updated from 1.0.6 to 1.1.0. This updates the minimum supported version to Unity 2019.4. It fixes an issue where you get compilation errors if you disable the built-in module Subsystems in your project and you install Adaptive Performance afterwards. This is an issue in Unity 2019.4+. A workaround is to enable the the Subsystem module again before installing Adaptive Performance. This means, the Support Matrix looks like:

    Unity 2018 LTS : Adaptive Performance and Samsung Android 1.1.9
    Unity 2019 LTS+: Adaptive Performance and Samsung Android 1.2.0
     
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We are happy to announce that Adaptive Performance 2.0.0 and Samsung Android 2.0.0 are now available. This verified release comes with many new features to improve your device performance. It comes with samples which can be use on the Samsung device but also in the Unity Editor in combination with the Device Simulator:
    • Samples to show off all Adaptive Performance features.
    • Editor settings for all features.
    • All features of Adaptive Performance 1.0. including Automatic Performance mode, Bottleneck and Thermal state detection.
    • Device Simulator Extension
    • A number of Scalers utilizing the Indexer
      • Adaptive Framerate
      • Adaptive VRR
      • Adaptive Resolution
      • Adaptive Sorting
      • Adaptive Batching
      • Adaptive Shadowmap Resolution
      • Adaptive Shadow Distance
      • Adaptive Shadow Quality
      • Adaptive Shadow Cascades
      • Adaptive LOD
      • Adaptive MSAA
    • Variable Refresh Rate Support.
    Quick Installation Guide:
    • Use the Unity Package Manager and install the Adaptive Performance.
    • Install and activate the Adaptive Performance Samsung Android provider in the Adaptive Performance Settings.
    • If you want to use the Device Simulator Extension, you also have to activate the Adaptive Performance Simulator provider in the Adaptive Performance Settings and install the Device Simulator Package.
    • Install Android Support for Unity. Unity needs Android Support to build to your Samsung device.
    • Switch Platform to Android in the Build Settings window.
    Please also read the Installation Guide in the manual, which has additional details.

    For additional information and upgrade guides, please see the first post.
     
  6. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
  7. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We released Adaptive Performance and Samsung Android 2.0.2 today which comes with bug fixes when you use Unity < 2020.2. Please read the change log linked above for details.

    We also release Samsung Android 1.2.1 today which replaces a broken 1.2.0 - please upgrade to Samsung Android 1.2.1 if you use 1.2.0. In case you use Unity 2018, please stay/downgrade to 1.1.9.
     
  8. mk0a1a

    mk0a1a

    Joined:
    Nov 24, 2018
    Posts:
    21
    Hello, I'd like to ask if there is any progress on a generic Android provider for Adaptive Performance? I'd like to know if work has already started on it. This package is pretty great but for it to work only with the latest Samsung devices makes it very limiting. Can we expect it soon? Maybe in 2021 or something? An ETA would be greatly appreciated.

    Also, I know this is in the Android subforum but can we expect this for other platforms? Like on Windows, iOS, etc.
     
  9. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    There is additional APIs in Android 11 which we evaluate at the moment. Most Thermal APIs, required for Adaptive Performance, are still missing on Android and iOS. We monitor the APIs closely and hopefully will be able to support more platforms in future. For now, if you use Adaptive Performance, it should be easy to adapt it for other platforms once they are available.
     
    mk0a1a likes this.
  10. kmedved

    kmedved

    Joined:
    Aug 18, 2016
    Posts:
    122
    It might be helpful if you need to check device thermal state: iOS / Android
     
    Thermos and David-Berger like this.
  11. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
  12. caletbak-sp

    caletbak-sp

    Joined:
    Dec 11, 2018
    Posts:
    6
    Hi!,

    I think this is a very nice feature to have in every game. I would like to know if there is any intention or you know if this will be available for iOS platform at anytime soon? Also for other Android device manufacturers.

    Thanks!
     
  13. kmedved

    kmedved

    Joined:
    Aug 18, 2016
    Posts:
    122
    Hi! You can use this asset for Android and iOS devices
     
  14. caletbak-sp

    caletbak-sp

    Joined:
    Dec 11, 2018
    Posts:
    6
    I have seen this asset previously, thanks. But this is only for receiving thermal events. The most interesting thing about AP is changing the CPU and GPU levels where needed and play with them.
     
  15. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We are researching possible extensions, but for now it's not available. However, you always can create a custom provider easily if you find yourself on platforms which have similar APIs available already.
     
  16. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,012
    I love the idea of this, but how many people actually use this package ? It seems like way too much work for most Indies to incorporate a plugin that only targets a subset of a subset of their user base. Unless this works out of the box across iOS and Android, surely the adoption rate will be low?
     
    apkdev and Noisecrime like this.
  17. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We are bound by API availability with the extension to other systems unfortunately. The good thing is that with Samsung you have million devices covered, as it's a pretty big part of the Android ecosystem and, once you implement it successfully, it will work out of the box for any other platform once it is available.
     
  18. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
  19. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
  20. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    68
    apkdev, Prodigga and SenseEater like this.
  21. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,012
    Yeah that's a little confusing. When you say "bound by API availablity", what exact does that mean?

    There is also this for all other android devices, right?:
    https://developer.android.com/ndk/reference/group/thermal

    So why can't this "just work" everywhere?

    I imagine most people will just roll their own solution that can work everywhere to some extent if they are willing to put in the work to add granularity to their game quality.
     
    SenseEater likes this.
  22. SenseEater

    SenseEater

    Joined:
    Nov 28, 2014
    Posts:
    82
    I think this has been mentioned in a post. The shared APIs are just thermal events whereas AP package also requires APIs to explicitly also change GPU/CPU clock level of device if i am not wrong.
     
    MassiveTchnologies likes this.
  23. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,012
    Right I see. I guess they don't want to "officially" support platforms that don't offer the entire feature set they require? After I posted I had a quick look at the scripting API for Unity's adaptive performance package and it seems there is a way to specify what sort of features are available.

    https://docs.unity3d.com/Packages/c...ine.AdaptivePerformance.Provider.Feature.html

    If all you have is thermal information, you can specify that. It would be great if the other platforms were supported by the official package even at this basic level? If there is a larger adoption of this feature and it proves useful then that might put pressure on other manufacturers to provide the missing APIs?
     
    MassiveTchnologies likes this.
  24. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    Thermal Info is a great API, and we'd love to support it on more platforms and using the Provider.Feature is exactly what will be used for it. (Alternatively you can already use it if you implement the provider yourself) We gonna add some more Provider.Feature helper function to make it more useful during runtime in the next release.

    The current APIs for thermal are less precise then what we use on Android/Samsung devices. The good news is that with Android 11 the thermal headroom API provides us with more details we can use to generate a thermal trend picture to service the basic functionality of AP.

    Thanks for your feedback, really appreciate it. Stay tuned for more updates soon!
     
    apkdev and Prodigga like this.
  25. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    694
    We released Adaptive Performance and Samsung Android 3.0.0-prev.2 which comes with several new features. It comes as verified package release candidates in 2021.2.0a19 but minimum requires version is 2021.2.0a18.

    New in 3.0 (3.0+ only)
    • Minimum Support Unity 2021.2
    • Startup Boost mode - Enables boost mode during engine startup.
    • Profiler Integration - Profile Adaptive Performance easily from the Unity Profiler.
    New in 3.0 (also coming to 2.2)
    • Scaler profiles - Easily define and change Adaptive Performance Scalers with predefined profiles.
    • Boost mode - Boost CPU and GPU for short periods of time.
    • Cluster info - Request cluster info to have details which and how many cores are available on the device.
    • Feature API - Check which Adaptive Performance feature is available on the current platform.
    • Adaptive view distance scaler - A new scaler to change the Camer.main view distance automatically.
    • Additional samples
    Boost mode, Startup Boost mode and Cluster info API require GameSDK 3.5 which is not released at this point, but you can use the Device Simulator Extension to simulate the features. We will keep you posted when GameSDK 3.5 is going to be publicly available on Samsung Phones. This is a release which comes with many new feature and we would love to hear feedback. Some features require a breaking upgrade, so please ensure your project is backed up properly!
     
    MateiGiurgiu and MartinTilo like this.
unityunity