public AdSequenceHandle ShowAdSequence(string placementId) { var handle = new AdSequenceHandle() { Result = ShowResult.Failed }; handle.Coroutine = StartCoroutine(ShowAdSequence(handle, placementId)); return(handle); }
IEnumerator ShowAdSequence(AdSequenceHandle handle, string placementId) { bool done = false; ShowAd(placementId, result => { handle.Result = result; done = true; }); yield return(new WaitUntil(() => done)); }