Right Click Load Scene help!
How do I make the game load a scene on right click? Attempting to learn a bit of this actually, apparently some things don't work in 5.3
Either way, is there a way I can make the game load a certain scene on the right click? Thank you!
Didn't get what I want, got what was needed. Thanks all for that in advance! Seriously, aheh.
Answer by DonkeyMalonkey · Jul 18, 2016 at 07:44 AM
javascript not c++!
import UnityEngine.SceneManagement;
if(Input.GetMouseButtonDown(1)){
SceneManager.LoadScene("TypeSceneNameHere");
}
You can also use SceneManager.LoadScene(indexOfScene);
I suggest you take a look at the Unity Scripting API.
here: https://docs.unity3d.com/ScriptReference/
for the mousebutton thing check this out: https://docs.unity3d.com/ScriptReference /Input.GetMouseButtonDown.html
The search button in the top right corner helps to find everything you need.
Your answer
Follow this Question
Related Questions
How to show and remove text before player has started the game? 1 Answer
Switching between a VR and non VR scene 1 Answer
How add(create) a new gameobject on scene on mouse button click. 2 Answers
GUI image displayed too large, why other scenes suddenly incredibly small? 1 Answer
Should we keep UI Canvas in Scene? 1 Answer