Help Wanted Rewarded Ads scripting

Hello everyone,

I am trying to implement a Rewarded Ads feature in my games, however I have some difficulties with scripting:

So I have two scripts:

This one is AdManager.cs:

 public void HandleRewardBasedVideoRewarded(object sender, Reward args)
    {
        if (RewardButton.canAddReward)
            RewardButton.Instance.AddReward();   
    }
[\CODE]
This is the (RewardButton.cs) script:

[CODE]
  public void AddReward(int rewardCount)
    {
        canAddReward = true;
        _currentCoinsAmount += rewardCount;
        DeltaCoinsText.text = String.Format("+{0}", rewardCount);
        DeltaCoinsText.gameObject.SetActive(true);
        StartCoroutine(UpdateCoinsAmount());
        // plus coin
        GameData.instance.SavePlayerCoin(_currentCoinsAmount);
        // play add coin sound
        AudioManager.instance.CoinAddAudio();
    
        if (GameObject.Find("MapScene"))
        {
            GameObject.Find("MapScene").GetComponent<MapScene>().UpdateCoinAmountLabel();
        }
  
    }
[\CODE]
Does anyone have an idea how I could eventually solve this?

Thank you so much for any valuable information.

Kind regards,

Ju

This is not a useful or actionable statement.

How to report problems productively in the Unity3D forums:

http://plbm.com/?p=220

Also, please use code tags: Using code tags properly

Help us to help you.