anonymous function does not take `0' arguments
unity 5.0 someting wrong,I don't know how to solve it,please help,thangk you very muck public MainLoop mainLoop; GetComponent().onClick.AddListener( ()=>{ mainLoop.OnClick(this); });
错误提示:
Assets/Script/Title.cs(15,49): error CS1593: Delegate UnityEngine.Events.UnityAction<UnityEngine.UI.Button>' does not take
0' arguments
help?
Dont know much of your problem if we cant see rest of the code. According to the error it looks like you are trying to call a function without arguments when its assigned to include arguments
This code makes no sense at all. GetComponent needs a type.
Your answer
Follow this Question
Related Questions
Assigning different buttons click events to the same function with a parameter dynamically 1 Answer
Adding a list of delegates to AddListener 1 Answer
How I can change listener via script? 1 Answer
How to write a script for an existing button 1 Answer
Assigning a GameObject variable to equal another GameObject variable via C# script. 0 Answers