// Use this for initialization void Start() { ShowAdButton.onClick.AddListener(OnShowAdButtonClicked); vrAd = new VRAd(1); vrAd.AdStatusChanged += OnAdStatusChanged; vrAd.LoadAd(); }
// Use this for initialization void Start() { Debug.Log("OmniVirt SDK Version v" + OmniVirt.SDK.SDK_VERSION); ShowAdButton.onClick.AddListener(OnShowAdButtonClicked); vrAd = new VRAd(1); vrAd.AdStatusChanged += OnAdStatusChanged; vrAd.LoadAd(); }
IEnumerator ReloadAd() { yield return(null); if (vrAd != null) { vrAd.Unload(); vrAd = null; } vrAd = new VRAd(1); vrAd.AdStatusChanged += OnAdStatusChanged; vrAd.LoadAd(); }