Search Unity

Feedback 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:
    666
    Hi all,

    We announced the Adaptive Performance Package during GDC. Today we released the package and would love to hear your feedback.

    For detailed information please also read the blog post and the package documentation.

    If you have questions or feedback please post below. For bug reports, please use the Unity built-in bug reporter.

    Please see A quick step-up guide below for install instructions.

    Enjoy and let us know if you use it for something great, we always love to hear about success stories.

    -db

    Breaking News:

    Adaptive Performance version 2.0.0-preview.1 brings the Device Simulator Extension to the Unity Editor! Simulate Adaptive Performance events in the Unity Editor!

    Adaptive Performance Talks

    Call of Duty Mobile & Adaptive Performance

    During Samsung Developer Conference 2019 Samsung and Unity presented Call of Duty Mobile optimizations using Adaptive Performance to increase the stability of the game on Samsung devices.



    Call of Duty Mobile & Adaptive Performance
    During Unite Copenhagen 2019 Samsung presented Call of Duty Mobile optimizations using Adaptive Performance to increase the stability of the game on Samsung devices.



    GDC 2019 and Megacity
    During GDC we gave several talks about adaptive performance. Please see the GDC Vault Samsung talk, which includes Adaptive Performance, here. Alternatively, please see the talk from the Unity Booth on our youtube channel here.




    Presentations

    You can find a slidedeck which describes details of Adaptive Performance here.

    Changelog

    https://docs.unity3d.com/Packages/com.unity.adaptiveperformance@1.0/changelog/CHANGELOG.html

    Version History

    The the latest version (1.0.1) and preview version (1.1.0) of Adaptive Performance is compatible with the following versions of the Unity Editor:
    • 2020.1 beta, alpha
    • 2019.3
    • 2019.2
    • 2019.1 (recommended for Megacity demo)
    • 2018.3
    The preview version (2.0.0) of Adaptive Performance is compatible with the following versions of the Unity Editor:
    • 2020.1 alpha, beta
    • 2019.3
    Note
    2020.1a6+ or 2019.3b6+ require 1.0.1 packages, if you are using older version of Unity, it's not required to update to the newest package. If you are using an earlier version of 2019.3 beta or 2020.1 alpha you should not update to 1.0.1 as it will not work.

    Device Support:

    SAMSUNG
    Adaptive Performance is currently supports following devices running Android P:
    • Galaxy S10
    • Note 10
    • Galaxy Tab S6
    • Galaxy Fold
    It supports those devices with Samsung GameSDK 1.5, 1.6.

    Adaptive Performance is supported on following devices running Android Q
    • All old and new Galaxy models
    It supports those devices with Samsung GameSDK 3.0+

    The GameSDK Adaptive Performance logs the version of the SDK:

    Code (CSharp):
    1.  
    2. Adaptive Performance: Subsystem version=1.6
    3.  
    GameSDK 1.6 update will be rolled out starting at the end of March 2019 on S10 devices. GameSDK 3.0 support will be rolled out with Android Q. The update schedule is different in each region.

    Unity Device Simulator Extension


    We released 2.0.0-preview of Adaptive Performance, which brings the Device Simulator extension for Adaptive Performance to simulate thermal and bottleneck events in the editor using the new device simulator so you can test your implementation already in the editor without deploying to the device!

    Simulate throttling events, thermal level and trends:
    ezgif-6-9531830706ab.gif
    Simulate bottleneck events, auto control mode and CPU/GPU levels.
    AP_Bottleneck.png

    Installation:
    1. Open Unity Package Manager
    2. Enable "Show preview packages" in the Advanced menu.
    3. Update or Install Adaptive Performance package to 2.0.0-preview.1
    4. Install the Device Simulator package (preview)
    5. The Simulator view will show the Adaptive Performance section as soon as the preview is installed and the Simulator view is opened.
    Note: Currently the simulation only works in Play Mode and states will not be saved. Being able to set the values before going into play mode will come in an later version.

    Packman.png

    A quick step-up guide for Adaptive Performance
    • Unity needs Android Support installed (to build to your Samsung device)
    • Set active platform to be Android in Build Settings Window
    • Install AP Samsung (Android) package which includes the subsystem, Unity Package Manager will automatically install the Adaptive Performance package as a dependency as well.
    Screen Shot 2019-08-21 at 6.22.31 PM.png
    • Build and Deploy to your device and it is active by default. If you want to see logging messages in development builds you can change UnityEngine.AdaptivePerformance.StartupSettings.Logging = true; and Adaptive Performance starts printing status information to the console.
    Note:
    If you are upgrading from Adaptive Performance 0.2.0-preview.1 you will need to update both packages; Adaptive Performance and AP Samsung Android manually from 0.2.0-preview.1 to 1.0.0.

    Note
    : If you have installed a preview version of Adaptive Performance before 0.2.0-preview.1 you will need to manually uninstall the Adaptive Performance package (com.unity.mobile.adaptiveperformance) before installing the latest version through the Adaptive Performance Samsung (Android) package (com.unity.adaptiveperformance.samsung.android and com.unity.adaptiveperformance) as we had to make updates to the API and package structure which made it impossible to auto-update the package due to namespace changes (from com.unity.mobile.adaptiveperformance to com.unity.adaptiveperformance).

    Capture.PNG

    To uninstall 0.1.0-preview.3 or 0.1.1-preview.1 simply go to the package manager and select the Adaptive Performance Package and use the uninstall button.

    Known Issues

    2.x:
    • Adaptive Performance Device Simulator Extension:
      - Auto Control Mode checkbox does not change the mode when used.
     
    Last edited: Dec 9, 2019
    Cromfeli, hippocoder and castana1962 like this.
  2. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    363
    Hi
    I am very interested in using Adaptive Performance for VR projects, for it, Is it VR Ready?
    Thanks for your time
    Regards
    Alejandro
     
  3. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Thanks, Alejandro,

    as mentioned in the blog the current preview targets Samsung Galaxy devices and is optimized for the Samsung S10 with more devices of the Samsung Galaxy family to follow. Our goal is to enable as many devices as possible to use Adaptive Performance in the future. The package is open source and you/anyone can take a look at the implementation at any time and add custom provider if necessary. What VR environment are you planning to use?
     
    castana1962 likes this.
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,093
    Looking hot. Very cool feature!

    ...

    I know desktops and consoles aren't the target markets but it seems quite handy to be able to see if the bottleneck is GPU or CPU at runtime for any platform, this information seems like something other platforms could use too?
     
    Peter77 likes this.
  5. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    True! It would be very handy to have that info available during runtime on any platform. In Adaptive Performance, we currently use the GPU frametime exposed by the Samsung GameSDK and compare it with CPU time to implement the feedback for the events (simplified). This is not optimal and can be improved, but that's what we use right now. Depending on information on other platforms this could be implemented similarly. Said that, the package is open source and it's designed to add any data provider you wish, so it should be possible to extend it, even if we don't support the target platform yet.
     
    hippocoder likes this.
  6. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    363
    Hi David
    First thanks to answer me so fast !!!
    On the other hand and answering your question, I am developing VR project for Oculus ( Rift/Go and hopeful Quest soon since that I think that this one will create a VR massive market) and HTC Vive/Valve.
    Since I think that the 3D Environment/Assets used in VR project are Low Poly( low quality), I am looking for some way to improve the VR Quality and its Performance and I would like to build them with DOTS and Adaptive Performance (taking as reference Megacity project).
    To be honest with you, It is very hard for me learn Adaptive Performance and ECS since that there are not many tutorials
    that teach us more deeply about both topics ( I saw some GDC 2019 conferences about them but unfortunate I cannot find them in the Unity Youtube Channel)
    Thanks to let me tell you about my VR projects and sorry for my little English
    Cheers
    Alejandro
     
  7. slime73

    slime73

    Joined:
    May 14, 2017
    Posts:
    43
    Have you looked into integrating it with Unity's existing FrameTiming APIs?
    https://docs.unity3d.com/ScriptReference/FrameTiming.html
    https://docs.unity3d.com/ScriptReference/FrameTimingManager.GetLatestTimings.html
     
  8. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    That's very good use-case, looking at VR and the need for stable framerate makes it a great scenario to add providers to utilize their APIs.

    Many of the tech in DOTs is still in preview and will be improved and get tutorials over time. Talking about Adaptive Performance this is the same, but everything you want to look into is in AdaptivePerformanceController in Megacity which controls the LODs. The main areas you might be interested in are mentioned in the blogpost such as thermal and bottleneck events handlers. The slides of my presentation about Adaptive Performance from GDC are linked in the blogpost as well. Once we have it on youtube, I'll link them here as well.

    For Megacity we have the landing page https://unity.com/megacity which includes several talks from Unite which are quite good to learn about the tech. But as it's still in preview and a lot of APIs and systems still change and get improved, so some talks might be dated.

    I hope that helps to get you started!
     
    castana1962 likes this.
  9. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    The APIs are platform/graphics API dependent but were appropriate we might integrate them. Those APIs have been created for dynamic resolution, which is a feature we would love to integrate into Adaptive Performance as well, probably as high-level Component.
     
  10. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    363
    Hi David
    Thanks for your help and your advice
    Best Regards
    Alejandro
     
  11. roberto_sc

    roberto_sc

    Joined:
    Dec 13, 2010
    Posts:
    120
    Very interesting!
    Where's the open source project? I couldn't find it on Unity GitHub. Thanks.
     
  12. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    It's a package, you can simply take the package content from its install location (Library/PackageCache) after installing it and add it to your local project e.g. into the local Package folder in your project root. See also the packages documentation here. Let me know how it goes!
     
  13. roberto_sc

    roberto_sc

    Joined:
    Dec 13, 2010
    Posts:
    120
    I wanted the repo to check if anyone is doing something on the iOS side.
     
  14. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    There's no public repo. You can easily integrate an iOS provider yourself. However, iOS currently only exposes thermal events, but no temperature trends or skin temperatures and does not provide the functionality to adjust CPU or GPU frequency.
     
  15. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    796
    Cool concept, but only one single device is supported thanks to a very specific SDK found on that manufacturers devices? What is plan of attack for rolling this feature out to all mobile devices from a variety of manufacturers? As cool as this feature is, it is a bit hard to adopt when there is no guarantee that this will ever fully work on anything other than Galaxy devices..? I love the ideas here though. Being able to tell the CPU and GPU to chill out when in the menu's, and being able to adjust performance on the fly to avoid overheating - all sounds great.

    For now, we'll just tick on 'Sustained Performance' and try out best to hit 60fps even with the lower CPU/GPU power.
     
  16. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    We hear you and yes, we believe in adaptive performance and that it would be very valuable on many platforms. However, it requires functionality only OEMs can expose those (or override them) and we want to ensure our API is right for the use-case Unity developer face.
     
  17. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Hi all,

    We have released a new version of Adaptive Performance. We made several changes to the API and package structure and hope it makes it more intuitive to use in the future. If you are new to Adaptive Performance, simply download the Adaptive Performance Samsung (Android) package via Unity Package Manager, it will install the Adaptive Performance package automatically as a dependency.

    Note: If you have installed a preview version of Adaptive Performance before 0.2.0-preview.1 you will need to manually uninstall the Adaptive Performance package before installing the latest Adaptive Performance Samsung (Android) package through the Package Manager. Please see the first post which we updated with some uninstall notes.

    What’s new in 0.2.0-preview.1?
    • Overhaul of the API and split into several interfaces for easier access and future binary compatibility.
    • Split of package into Adaptive Performance package and Adaptive Performance Samsung (Android) subsystem package.
    • CPU frame time added
    • Configurable logging frequency added
    • Added a AutoPerformanceLevelController which updates CPU and GPU level automatically based on the target framerate.
     
  18. VagantB

    VagantB

    Joined:
    May 28, 2019
    Posts:
    6
    Hi,
    is there a way to use Adaptive Performance on a Samsung Galaxy Tab S4,
    we would like to try it in our specific project.
     
  19. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    No. Currently, Adaptive Performance is available on Galaxy S10. We work on expanding it to more devices in future.
     
  20. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Hi all,

    We have released Adaptive Performance 1.0.0 and moved it out of preview.

    If you are new to Adaptive Performance, simply download the AP Samsung Android 1.0.0 package via Unity Package Manager, it will install the Adaptive Performance package automatically as a dependency.

    If you are upgrading from Adaptive Performance 0.2.0-preview.1 you will need to update both packages; Adaptive Performance and AP Samsung Android manually from 0.2.0-preview.1 to 1.0.0.

    Screen Shot 2019-08-21 at 2.36.56 PM copy.png

    Note: If you have installed a preview version of Adaptive Performance before 0.2.0-preview.1 you will need to manually uninstall the Adaptive Performance package before installing the latest AP Samsung Android package through the Package Manager. Please see the first post which we updated with some uninstall notes.

    What’s new in 1.0.0?
    • Compatibility with On Demand Rendering (Unity 2019.3 feature)
    • Added compatibility for Samsung GameSDK 3.0
    • Fix GPU time evaluation resulting in unknown bottlenecks in rare cases when using Samsung GameSDK 1.5
     
  21. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    335
    hello,

    what is difference between "com.unity.mobile.adaptiveperformance" and "com.unity.adaptiveperformance" ? mobile and other platforms??

    or we can using "com.unity.mobile.adaptiveperformance" on all platforms?
     
  22. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Hey, thanks for the question,

    TLDR; com.unity.mobile.adaptiveperformance is a deprecated preview package and you want to use com.unity.adaptiveperformance now and depending on platforms, a specific platform provider such as com.unity.adaptiveperformance.samsung.android.


    We have a note in the first post to explain the transition, but I'll extend it to make it more clear by adding the bundle id name changes. You want to uninstall all previous packages (com.unity.mobile.adaptiveperformance) and install the new packages (com.unity.adaptiveperformance.samsung.android and com.unity.adaptiveperformance). Please let me know if that helps. Here's the note:


    Note: If you have installed a preview version of Adaptive Performance before 0.2.0-preview.1 you will need to manually uninstall the Adaptive Performance package (com.unity.mobile.adaptiveperformance) before installing the latest version through the Adaptive Performance Samsung (Android) package (com.unity.adaptiveperformance.samsung.android and com.unity.adaptiveperformance) as we had to make updates to the API and package structure which made it impossible to auto-update the package due to namespace changes (from com.unity.mobile.adaptiveperformance to com.unity.adaptiveperformance).
     
  23. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    335
    nice :]
    so ... its possible to using this new on all platforms?? awesome ...

    and have to rewrite like this?

    Code (CSharp):
    1.  
    2. using UnityEngine.AdaptivePerformance;
    3.  
    4. public class blablabla : MonoBehaviour
    5. {
    6.     IAdaptivePerformance performance;
    7.  
    8.     void Start()
    9.     {
    10.         performance = Holder.Instance;
    11.         performance.ThermalStatus.ThermalEvent += OnThermalEvent;
    12.     }
    13.  
    14.     void OnThermalEvent(ThermalMetrics item)
    15.     {
    16.         switch (item.WarningLevel)
    17.         {
    18.             case WarningLevel.NoWarning:
    19.                 BLABLABLA;
    20.                 break;
    21.             case WarningLevel.ThrottlingImminent:
    22.                 BLABLABLA;
    23.                 break;
    24.             case WarningLevel.Throttling:
    25.                 BLABLABLA;
    26.                 break;
    27.         }
    28.     }
    29. }
     
  24. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    The code is correct. That's the changes you will need. I attached the AdaptivePerformanceController.cs used in Megacity demo project and updated to 1.0.0 package APIs.

    The Adaptive Performance package (com.unity.adaptiveperformance) can run on any platform, but currently, there is only a Samsung provider available (com.unity.adaptiveperformance.samsung.android). But we are looking into offering additional provider packages in future.

    Hope this helps!
     

    Attached Files:

    Davood_Kharmanzar likes this.
  25. Shirzad

    Shirzad

    Joined:
    Dec 8, 2016
    Posts:
    16
    Thank you David!
     
  26. VagantB

    VagantB

    Joined:
    May 28, 2019
    Posts:
    6
    Hello David,
    is Adaptive Performance now working on all Samsung Devices?
    we mostly work with samsung tabs and would try it in our next project.

    thank you, for your time
     
  27. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Currently, it's only supported on Samsung S10, but stay for more news soon.
     
  28. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Call of Duty Mobile & Adaptive Performance
    During Unite Copenhagen 2019 Samsung presented Call of Duty Mobile optimizations using Adaptive Performance to increase the stability of the game on Samsung devices. The recording is available now and you can watch it here:

     
  29. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Please be advised that a new version of Adaptive Performance (1.0.1) and the Samsung Provider (1.0.1) have been released. These versions are required if you are using Unity 2020.1a6+ or 2019.3b6+, if you are using older version of Unity, it's not required to update to the newest package. If you are using an earlier version of 2019.3 beta or 2020.1 alpha you should not update to 1.0.1 as it will not work.
     
  30. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    We released 2.0.0-preview.1 of Adaptive Performance today, which brings the Device Simulator extension for Adaptive Performance to simulate thermal and bottleneck events in the editor using the new device simulator so you can test your implementation already in the editor without deploying to the device!

    Simulate throttling events, thermal level and trends:
    AP_Thermal.png

    Simulate bottleneck events, auto control mode and CPU/GPU levels.
    AP_Bottleneck.png

    Installation:
    1. Open Unity Package Manager
    2. Enable "Show preview packages" in the Advanced menu.
    3. Update or Install Adaptive Performance package to 2.0.0-preview.1
    4. Install the Device Simulator package (preview)
    5. The Simulator view will show the Adaptive Performance section as soon as the preview is installed and the Simulator view is opened.
    Note: Currently the simulation only works in Play Mode and states will not be saved. Being able to set the values before going into play mode will come in an later version.

    Packman.png

    There's more planned for the simulator, so please stay tuned and as always, we would love to hear your feedback! Happy developing!

    Edit: Corrected the package version
     
    Last edited: Jan 8, 2020
    eizenhorn likes this.
  31. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    Hi all,
    we have a new presentation available and overworked the first post to reflect all changes better. Hope you enjoy the talk!

    Call of Duty Mobile & Adaptive Performance
    During Samsung Developer Conference 2019 Samsung and Unity presented Call of Duty Mobile optimizations using Adaptive Performance to increase the stability of the game on Samsung devices.

     
  32. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    1.1.0-preview.3 is available now which fixes UI issues in the Device Simulator extension and fixes a bug which would not show CPU/GPU timings in the Simulator when you go into play mode.

    Also a little vide on how Thermal Throttling Simulation works in the Editor
    ezgif-6-9531830706ab.gif
     
  33. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    666
    We recently release Adaptive Performance 1.1.0-preview.4 and removed the device simulator extension as it requires breaking changes which can not be introduced to 1.x.x but it comes with additional fixes.

    We also release Adaptive Performance 2.0.0-preview.1 which adds the device simulator extension.

    This should help to update the verified packages in future without introducing API breaking changes.

    What does this mean for support?

    Adaptive Performance Packages:
    • 1.x.x supports Unity 2019 LTS as verified package
    • 2.x.x supports Unity 2020 LTS (planned) as verified package
     
    Last edited: Jan 8, 2020
unityunity