Unity Click Counter | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Unity Click Counter

Example: I have 3 Images and 1 Text, if I click the 1st Image, it will update the TEXT and make it 1 and then the image will be disable, if I click the 2nd image it will update the TEXT and make it 2 and then disable the image, and even in 3rd image. I am new to C# and Unity, Please provide an answer or code that the beginner like me will understand. Please. TIA

4th Sep 2018, 1:33 AM
Mugiwara
Mugiwara - avatar
3 Antworten
0
int clickCount = 0; @Override On Mouse clicked (MouseClickedEvent event) { clickCount++; }
4th Sep 2018, 8:50 AM
Eldar Bakerman
0
What if I click the image and it will update the text and then that image will be disable .
4th Sep 2018, 1:51 PM
Mugiwara
Mugiwara - avatar
0
Don't you have an option of generating that method?
4th Sep 2018, 1:54 PM
Eldar Bakerman