public void Hide(bool destroy = false) { if (m_BannerBundle != null) { if (destroy) { m_BannerBundle = null; m_BannersClass.CallStatic("destroy"); } else { m_CurrentActivity.Call("runOnUiThread", new AndroidJavaRunnable(() => { var parent = m_BannerBundle.bannerView.Call <AndroidJavaObject>("getParent"); parent?.Call("removeView", m_BannerBundle.bannerView); })); if (m_BannerShowOptions?.hideCallback != null) { m_Banner.UnityLifecycleManager.Post(() => { m_BannerShowOptions?.hideCallback(); }); } } } }
public void Hide(bool destroy = false) { if (destroy) { IsLoaded = false; return; } m_BannerPlaceholder.HideBanner(); m_Banner.UnityLifecycleManager.Post(() => { m_BannerShowOptions?.hideCallback(); }); }