defold / defold/extension-admob

Pause game engine during video & rewarded ads

Open
#39 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
55
Forks
17
Avg merge
19h 6m
Merged PRs (30d)
1

Description

Hello! Finally tinkering away with my games again, and have run into a problem with iOS vs Android.

On Android, when you show a rewarded video, the game completely pauses, and no code is executed again until the ad is closed.

On iOS, unfortunately for me, the game code continues to run while the ad is being displayed. This has led to unexpected bugs, since I developed first on Android.

Main issues this causes:

1. We have to write code to pause/resume music
2. Code that executes in the "reward completed" callback will execute before the game is visible again. On Android that is not the case.

I can code around these for now, but it would be convenient to make the platforms behave similarly if possible.

Unity's ad sdks have a convenience function `SetiOSAppPauseOnBackground(true)`, but I am not sure how it works since it calls some External code.

https://github.com/googleads/googleads-mobile-unity/blob/main/source/plugin/Assets/GoogleMobileAds/Platforms/iOS/MobileAdsClient.cs#L88

I wasn't sure if this would be better solved in this extension or the engine itself. I experienced a similar problem with DefVideoAds before I switched to Admob. Happy to move the request if needed.

Have a nice holiday season!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.