- Home /
StackOverflowException on UI Button message
Hello
I'm trying to get my button working in NGUI unity, so that when someone clicks on it, it will quit the application, i've got collider on it and my own script with OnClick function and UI button message.
When i click on the button in play mode though it comes up with the overflow errors. I just want the application to close. On my button I have Box Collider, UI Button (Script), My button click script, UI button color and ui button message.
public class buttonClick : MonoBehaviour
{
void OnClick()
{
Application.Quit();
}
}
$$anonymous$$ight need to show us your code. Generally stack over flows are caused by code that calls itself over and over recursively, so you probably have something in your button press script that is calling itself.
Your answer
Follow this Question
Related Questions
I'm getting StackOverFlowException 1 Answer
How to ignore Overflow Exception 2 Answers
Catching a Stack Overflow 1 Answer
int array overflow exception 1 Answer