@Anis1808 how do i do it with this code though?
public void OnGUI()
{
GUIStyle style = new GUIStyle();
Rect rect = new Rect(0, 0, Screen.width, Screen.height);
style.alignment = TextAnchor.LowerRight;
style.fontSize = (int)(Screen.height * 0.06);
style.normal.textColor = new Color(0.0f, 0.0f, 0.5f, 1.0f);
float fps = 1.0f / this.deltaTime;
string text = string.Format("{0:0.} fps", fps);
GUI.Label(rect, text, style);
// Puts some basic buttons onto the screen.
GUI.skin.button.fontSize = (int)(0.035f * Screen.width);
float buttonWidth = 0.35f * Screen.width;
float buttonHeight = 0.15f * Screen.height;
float columnOnePosition = 0.1f * Screen.width;
float columnTwoPosition = 0.55f * Screen.width;
Rect requestBannerRect = new Rect(
columnOnePosition,
0.05f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(requestBannerRect, "Request
Banner"))
{
this.RequestBanner();
}
Rect destroyBannerRect = new Rect(
columnOnePosition,
0.225f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(destroyBannerRect, "Destroy
Banner"))
{
this.bannerView.Destroy();
}
Rect requestInterstitialRect = new Rect(
columnOnePosition,
0.4f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(requestInterstitialRect, "Request
Interstitial"))
{
this.RequestInterstitial();
}
Rect showInterstitialRect = new Rect(
columnOnePosition,
0.575f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(showInterstitialRect, "Show
Interstitial"))
{
this.ShowInterstitial();
}
Rect destroyInterstitialRect = new Rect(
columnOnePosition,
0.75f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(destroyInterstitialRect, "Destroy
Interstitial"))
{
this.interstitial.Destroy();
}
Rect requestRewardedRect = new Rect(
columnTwoPosition,
0.05f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(requestRewardedRect, "Request
Rewarded Ad"))
{
this.CreateAndLoadRewardedAd();
}
Rect showRewardedRect = new Rect(
columnTwoPosition,
0.225f * Screen.height,
buttonWidth,
buttonHeight);
if (GUI.Button(showRewardedRect, "Show
Rewarded Ad"))
{
this.ShowRewardedAd();
}
Rect textOutputRect = new Rect(
columnTwoPosition,
0.925f * Screen.height,
buttonWidth,
0.05f * Screen.height);
GUI.Label(textOutputRect, outputMessage);
}