Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Changing Unity Ads Gui Texture

$
0
0
Hello everyone!I just implemented unity ads into my IOS game. It works, so far, but I cannot figure out how to implement a different if statement. Instead of using The standard unity gui ( the translucent gray that is default for script ) I want to use my own 2d texture. The code I have is: using System; using UnityEngine; using UnityEngine.Advertisements; public class test1 : MonoBehaviour { void Awake() { if (Advertisement.isSupported) { Advertisement.Initialize ("64318"); } else { Debug.Log("Platform not supported"); } } void OnGUI() { if(GUI.Button(new Rect(10, 10, 150, 50), Advertisement.IsReady() ? "Show Ad" : "Waiting...")) { // Show with default zone, pause engine and print result to debug log Advertisement.Show(null, new ShowOptions { resultCallback = result => { Debug.Log(result.ToString()); } }); } } } I want to use: GUI.DrawTexture(new Rect(0, 0, image.width, image.height), image); where I define the gui (in the if statement, line 15) however, I have tried implementing it, and no method I use is correct. How would I implement it? Thanks a lot!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>