- Home /
 
 
               Question by 
               Wolfshadow · Aug 21, 2015 at 12:06 PM · 
                c#iosadsguitextureunity ios  
              
 
              Changing Unity Ads Gui Texture
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!
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Gui Texture Differences 1 Answer
My already released iOS app only shows Unity placeholder ads :( 1 Answer
GUITexture is lagging my object 0 Answers