On Click Button
Hi,
I'm new to Unity so I apologise if this ends up being obvious.
I have Unity 5.3.1.
I've created a UI button and I'm just trying to get it to load a scene. However, the scene doesn't load. Every tutorial I've watched/read shows how you call the function at the bottom of the Button Script where there is a field for OnClick. I don't have this. All I have is the following:
![alt text][1] [1]: /storage/temp/60459-screen-shot-2015-12-22-at-24736-pm.png
This looks completely different to all of the videos I've watched that are using older versions of Unity and I can't for the life of me worked out how to use it. I've tried adding an Event Trigger component but that just has a bunch of Persistent Calls options I can't work out how to use either.
I'm using the script:
using UnityEngine; using System.Collections; using UnityEngine.SceneManagement;
public class PlayGame : MonoBehaviour {
public void Play()
{
SceneManager.LoadScene (0);
}
}
Answer by Srki94 · Dec 22, 2015 at 09:24 AM
It looks like you are in Debug view mode. Check the screenshot to see how to go back to normal view mode in the Inspector.
So, in the Inspector there is a small button near the lock the inspector button, by clicking it new context menu expands. Select "Normal".
Your answer
Follow this Question
Related Questions
i want to browse a picture from a directory to be used as a username login. 0 Answers
A Problem With A Script Of GUI.HorizontalSlider It Do not Move? 0 Answers
GUI elements are not distorted by the VR camera 0 Answers
My Brain is fogged: How do I move a networked object with user input 0 Answers
Location Does Not Change 1 Answer