every time the game start, after a few seconds there is a big gc collect and a few frame rates drop that lasts over a second, after that every thing works smoothly, only happnes when unity ads is integrated.
any way to solve it? checked every sdk version from 3.1.1 to 3.4.2 on unity 2018.4.15f1
need to mention there are over 6 ad placements configures in the dashboard
The ads sdk does make some requests to backend services when it initializes, but it does this always on background threads so as to not create any perceived lag in your UI input. Frame rate drop is possible as the ads SDK is performing operations to initialize itself, though it should be fairly minimal.
To clarify further do you notice this only when Unity Ads SDK is integrated but not initialized, or are you noticing this frame rate drop once you call initialize. The Ads SDK will attempt to download your configuration and cache some ads all at initialization just so you are aware. While we strive to minimize any impact to your game, these operations do take some cpu cycles to complete.
If can share any additional details that would help us pinpoint an issue that we can address that would be appreciated.
i disabled some placements, including the default ones, currently there are exactly 6 placements enabled in the dashboard, the frame freeze time is reduced, still noticable but not as criticle as before, init get called right on the first start function in the game, the lag happnes few seconds after that, probably when parsing the video ads data or what ever is going on when handeling it in the background, to check it you can create a project with 10 video/reward video placements and run it on old device, galaxy j7 in my case.
you should expose specific ad placement load function, so the dev could decide when to time each placement load according to its priority.
Thanks for clarifying and your request is spot on for how to solve what your experiencing. This feature is actually in closed beta right now and should be available in the near future for all Ads SDK users. If you like, you can request access from ads-support@unity3d.com to get into the beta, or you can wait for our next minor release (expected to be 3.5.0) for open access to this feature.
More information can be found here: Unity Ads SDK API reference
is there any ETA for 3.5.0 with load api? and i assume it will not be supported in unity 2018.4.15?
with admob, there are alot of “do it this way” integration rules to be applied to comply with the invalid traffic policy, i can only suggest that unity ads will hardly consider to keep the “timers” current load logic they have, and make the load function call only to set some bool to true, and not instantly try to load, the sdk will load it when ever its ready to do so, so if there some sort of minimum time to wait between each load, the api implementation will not be able to cause “damage” by flooding ads requests or any thing else that is not policy complaint, for example put load calls in fixed update/while loop etc, preventing the implementation to break the sdk/policy rules