- Home /
Game crashed after enabling 29 button at the same time
Hi guys. I just make a alphabet game and I have to create a 29 button for each letters. So, when i press " play" button 29 buttons should be appear. But game crashed and shut down itself. These all happening on the phones, not on the editor. I can not understand.Why phones cant handle just 29 button ?
Answer by Tomatotom1234 · Jan 07, 2021 at 05:10 PM
@agackarakas have you tried with just 10 or so? that way you can see whether or not the buttons are the problem
Oh, I haven't tried. I will try this and let you know the results. Thanks for the answer.
I decreased the button number to 2 from 29. And it worked. Now we can see buttons are the problem. What can ı do ?
What scripts do you have on the buttons? (If you have any). And what is parented to the button as well? Having multiple UI Elements should not affect the speed of your game by the slightest, unless there are large scripts running simultaneously on the buttons, which would cause it to crash.
This is the scripts buttons have. I dont think the script is the problem. Anyway, I will try to build and open my game on the phone with 29 same Image without button and my scripts.
[1]: /storage/temp/173843-qq.png
The parent of the buttons is empty object with scroll rect.
I removed Buttons script and my script from buttons and tried again. Result was same. Now I will remove the sprite and try again.
Your answer
Follow this Question
Related Questions
Array out of range! 1 Answer
HELP! Buttons stop working when made a child of a "Canvas Group" empty in 4.6.3f1? 4 Answers
My buttons do not appear when paused? 2 Answers
texture import error 0 Answers
KeyCode change variable values 0 Answers