- Home /
problems with iAD banner
as it says im having problems putting a simple iAD banner at the bottom of my screen, for some reason i get errors in the code a lot of them even when i use the standard unity doc code, any help please.
HERES THE CODE
private var banner : ADBannerView = null;
function ShowBanner() {
while (!banner.loaded && banner.error == null)
yield;
if (banner.error == null)
banner.Show();
else banner = null;
}
function OnGUI() {
GUI.enabled = (banner == null ? true : false);
if (GUILayout.Button("Show Banner")) {
banner = new ADBannerView();
banner.autoSize = true;
banner.autoPosition = ADPosition.Bottom;
StartCoroutine(ShowBanner());
}
}
this is driving me insane, its the last frikin thing
i seem to get a lot of $$anonymous$$ identifier: 'ADPosition'. and so on if that helps
Unexpected token: ADBannerView.
doesnt make ny sense this is from unitys reference
Answer by babaji1234 · Feb 22, 2014 at 05:15 AM
In unity 4.3 all iad code was rewritten and this code wont work and will give you errors
use this link-
https://docs.unity3d.com/Documentation/ScriptReference/ADBannerView.html
Your answer
Follow this Question
Related Questions
iOS iAD Problem Rejection 0 Answers
iAds scripting problem 0 Answers
Tapping iAd via AdMob is triggering RANDOM clicks on sprites in my scene. 1 Answer
SDK updater failed 0 Answers