I’m trying to implement google’s reward based video ad in my unity game but on " rewardAd.OnAdRewarded += HandleOnAdRewarded;" it shows 'parameter doesn’t match the delegate.
Also my complete code for that handler is this:
" public void HandleOnAdRewarded(Object sender, Reward args){
I have no idea why they included the sender parameter but simply remove it and it 'should’™ work. Even on that page they dont mention the sender parameter, they just have it in the code?
Yeah, there is a difference between Object and object. They use the lower case in that doc while you have uppercase. That might be the only thing wrong. I haven’t used google ads, so it’s a guess.
Not necessarily. If you’re using the System namespace, “object” will be the same as “Object”. If you’re using the UnityEngine namespace, “Object” will be the same as UnityEngine.Object.
If you’re using both the System and UnityEngine namespaces, you will get an error when you try to use “Object”, because it doesn’t know whether you mean UnityEngine.Object or System.Object.
Yes, you will get an error. But seeing as how this isn’t what was said and I was simply trying to solve their issue, I wasn’t going to go into that much detail. Still possibly good info to add.