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

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

    Note that the latest version (1.0.0) of Adaptive Performance is compatible with the following versions of the Unity Editor:
    • 2019.3 beta - official support
    • 2019.2
    • 2019.1 (recommended for Megacity demo)
    • 2018.3

    Adaptive Performance is currently supported on Galaxy S10 devices with Samsung GameSDK 1.6.
    GameSDK 1.6 update will be rolled out starting at the end of March on S10 devices. The update schedule is different in each region. Adaptive Performance logs the version of the SDK:

    Code (CSharp):
    1.  
    2. Adaptive Performance: version=1.6
    3.  
    For detailed information please also read the blog post and the package documentation.

    A quick step-up guide:
    • 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.

    Changelog:

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


    Adaptive Performance Talks
    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.



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

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

    -db
     
    Last edited: Aug 22, 2019
    Cromfeli, hippocoder and castana1962 like this.
  2. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    362
    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:
    659
    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:
    25,445
    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:
    659
    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:
    362
    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:
    30
    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:
    659
    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:
    659
    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:
    362
    Hi David
    Thanks for your help and your advice
    Best Regards
    Alejandro
     
  11. roberto_sc

    roberto_sc

    Joined:
    Dec 13, 2010
    Posts:
    113
    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:
    659
    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:
    113
    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:
    659
    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:
    757
    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:
    659
    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:
    659
    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:
    5
    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:
    659
    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:
    659
    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:
    275
    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:
    659
    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:
    275
    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:
    659
    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:
    10
    Thank you David!
     
  26. VagantB

    VagantB

    Joined:
    May 28, 2019
    Posts:
    5
    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