Our setup:
- Unity 2020.3.47
- UniWebView 5.3.0
- Applovin MAX (Unity 5.10.1 / Android 11.10.1)
- Android build
We have a browser game running on Phaser in UniWebView. We try to integrate Applovin MAX but run into an issue. The problem is that FPS drops dramatically when running HTML canvas scenes after Applovin initialization. Actually, there are 2 scenarios (we ran tests with only one mediation network enabled at a time):
Scenario 1: The game runs smoothly until the first ad is watched (networks: Applovin, Facebook, Mintegral)
Scenario 2: The game starts lagging after Applovin is initialized, even if no ad is loaded (networks: AdMob, Unity Ads, Ironsource)
Our guess was that some other webpage is consuming CPU on the same thread as our game, because webview inspector showed some other pages running in the same webview after AdMob initialization:
But in the case with only Applovin enabled (no other networks), inspector shows only our webpage, and it's still lagging:
We tried running performance profiler in the Chrome inspect tool, and that's what it shows when the game is lagging:
And that's what it shows when the game runs smoothly:
There's also a trace tool in the inspector and it shows dropped frames:
The Unity profiler doesn't show any difference whether the game is lagging or runs smoothly.
So we are trying to find answers to these questions:
- Is there a way or a tool to detect what's consuming the CPU?
- Is there a workaround to stop Applovin from affecting webview performance?
UPD: A possible workaround for us is switching Phaser rendering mode from Canvas to WebGL. It seems to improve performace, but it's related to some issues since we use old Phaser 2.6.2.