Unity Ads API
Hi Everyone,
I'm using Unity 5.2.2f1 and I'm trying to use Unity Ads in my project, I've linked the Ads account to the Game in Unity.
I've looked at http://docs.unity3d.com/Manual/UnityAdsHowTo.html
I know it say API changes: method names have been changed to be in line with normal C# naming conventions.
I copied and pasted this from the SERVICES: INTEGRATING UNITY ADS tutorial,
'Advertisement' is not being recognized in MonoBehaviour or VisualStudios and is being highlighted red, so do I still have to download the Ads asset in the asset store?
Its driving me insane lol, any help would be appreciated.
using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;
public class SimpleAds : MonoBehaviour
{
void Start ()
{
Advertisement.Initialize ("33675", true);
StartCoroutine (ShowAdWhenReady());
}
IEnumerator ShowAdWhenReady()
{
while (!Advertisement.isReady())
yield return null;
Advertisement.Show ();
}
}
Answer by Mission-Accomplished · Nov 18, 2015 at 09:25 PM
Everything seems to be working perfectly now.
So what did you do???? i have this stupid error because unity cant find this and the code was working in 5.4 and now in 5.5 cant find the dam thing
I had to change the build settings back to android. When I upgraded it set it to PC