System.Action has some invalid arguments
Hello Unity Developers, Did any one of you face this issue and can help to fix it please:
Error 1:
CS1502: The best overloaded method match for`AndroidVideoAdsManager.RequestVideoAd(System.Action)' has some invalid arguments
+++++++++++++++++++++++++++++++++++++++++++++++++
Error2:
CS1503: Argument #1' cannot convert
System.Action' expression to type `System.Action'
+++++++++++++++++++++++++++++++++++++++++++++++++
MainScript:
#elif UNITY_ANDROID
AndroidVideoAdsManager.Instance.RequestVideoAd(callback);
#endif
+++++++++++++++++++++++++++++++++++++++++++++++++
AndroidVideoAdsManager Script:
Action rewardCallback;
public void RequestVideoAd(Action rewardCallback)
{
this.rewardCallback = rewardCallback;
foreach (AdProvider provider in prioritizedProviders)
{
if (IsAdAvailable(provider))
{
RequestVideoAd(provider);
return;
}
}
Your answer
Follow this Question
Related Questions
How can I make a patch system for my game? 0 Answers
Assign action to UI button 0 Answers
Animation won't stop (Solved) 2 Answers
What is a Callback? 1 Answer
Help with Checkpoint (C#) 1 Answer