- Home /
Question by
Johnz1234 · Jun 09, 2015 at 07:42 AM ·
scriptingbasics
No OverLoad method for button takes 4 argumets?
Iam trying to show ad when i press my gui button but it's giving me this error?
if (GUI.Button (new Rect (currentGameOver.x + (currentGameOver.width - -280), currentGameOver.y + (currentGameOver.height - -220), 130, 100), "", skin.GetStyle ("Play"),Advertisement.isReady ())) {
Advertisement.Show (null, new ShowOptions {
pause = true,
resultCallback = result => {
Debug.Log(result.ToString());
}
});
}
Comment
Answer by tanoshimi · Jun 09, 2015 at 07:53 AM
Read the whole error message, then look at the method reference - there's no overload of Button that takes Rect, string, GuiSkin, bool (assuming that's what isReady is): http://docs.unity3d.com/ScriptReference/GUI.Button.html
Not sure what you're trying to achieve with isReady, but you can't pass it as an additional parameter to Button().
Your answer
Follow this Question
Related Questions
Project Scripting - Tracking variables (General Question) 2 Answers
How Do You Parent an Object With Scripts? 1 Answer
What does the word for mean in javascript? 1 Answer
Why button is not display the window 2 Answers
Game is Paused Menu shows up 0 Answers