i was trying to implement StartApp ad network to my android application and i had this error when i click on the button to show the ads :
Exception: Field currentActivity or type signature not found
UnityEngine._AndroidJNIHelper.GetFieldID (System.IntPtr jclass, System.String fieldName, System.String signature, System.Boolean isStatic) (at <2f4b1d01c9a3419997bae38a98e4dc24>:0)
The code :
public Text todayEarnings;
public Text totalEarnings;
public void OnMouseDown()
{
gameObject.GetComponent().enabled = false;
gameObject.GetComponent().enabled = false;
todayEarnings.enabled = false;
totalEarnings.enabled = false;
var ad = AdSdk.Instance.CreateInterstitial();
ad.RaiseAdLoaded += (sender, e) => ad.ShowAd();
ad.RaiseAdVideoCompleted += (sender, e) =>
{
SceneManager.LoadScene("playScene1");
};
ad.LoadAd(InterstitialAd.AdType.Rewarded);
}
↧