Unity How To Make a Quit Button

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

this is a pretty good tutorial, but here are a few tips
for one, you dont need to make another gameobject for the script, you can simply add the script to the button itself.
another thing is that if you're in the editor and want to make sure the button works, add the line "Debug.Log("quit game");". you can write whatever you want in place of "quit game", thats just what i made it.

Cardinal_
Автор

Honestly made me feel so much better. I thought I had figured out but then something always went wrong. This video saved me hours of stress

RyanCmr
Автор

Thanks dude, I tried 3 other tutorial videos and they all used scene loaders and exit game i their script instead of quitgame, yours worked while others the exitgame didnt appear in the onclick

kekw
Автор

Holy, finally someone taught me that... Thx you very much!

nitendogamerswitchwiiwiiu
Автор

thanks it worked for me i use version 2019 and it worked

SietseGaming
Автор

When I try to add the script to the manager I get a pop up that says 'Can't add script component 'Quit' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match." I would really appreciate it if you could help because it always does this and I've been through like 20 tutorials on how to make a quit button
Edit: It works now

Infernoplex
Автор

Can we use this same technique for VR Using XR Interaction Toolkit ?

mohammadrazakhan
Автор

Can someone please give me the Music Name? Also, Great Tutorial

FoxiSAGMantion
Автор

Hi im new to scripting, can u do a vid about play button? Thank youu

yourmobilegamer
Автор

Cant get it to work, even on the phone.

JonBaldockInkDrawings
Автор

When I try to add the script to the manager, it gives me a pop-up saying "The script don't inherit a native class that can manage a script."

ly_vri
Автор

When i take my gameobject into the Button there is no funktion called gameobject what Can i do?

xcyfihw
Автор

I am on my second account rn i am the guy hanuted times reply

hauntedtimes
Автор

cool works when im making this comment

askdjtekhnwrijtgneijrgerigeire
Автор

this wasn't helpful at all.
proof: i use Unity in pc

soapyboiman