예제 #1
0
 private void onUnityBannerClick(string placementId)
 {
     m_Banner.UnityLifecycleManager.Post(() =>
     {
         m_BannerShowOptions?.clickCallback();
     });
 }
예제 #2
0
        private void OnGUI()
        {
            if (!IsShowing)
            {
                return;
            }

            var myStyle = new GUIStyle(GUI.skin.box)
            {
                alignment = TextAnchor.MiddleCenter, fontSize = 20
            };

            if (GUI.Button(GetBannerRect(BannerPosition), aTexture))
            {
                BannerOptions?.clickCallback();
            }

            if (aTexture)
            {
                var bannerRect = GetBannerRect(BannerPosition);
                GUI.DrawTexture(bannerRect, aTexture, ScaleMode.ScaleToFit);
                GUI.Box(bannerRect, "This would be your banner", myStyle);
            }
        }