Hi there!
Ok so, this is really a basic question, I don’t know what I did wrong here: I followed Unity’s Doc Tutorials and a couple on youtube, difference is they get things done, I don’t!
In my first Scene I made a plane and I attached to it a 2d texture, I’m using it as a background.
I also attached it a script for a simple GUI in which I plan to store one button to make Unity Load another Scene… I thought that would have been the difficult part but then I stumble upon this problem:
using UnityEngine;
using System.Collections;
public class GUIMenu : MonoBehaviour {
public GUIStyle customBox;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
// Many Things concerning GUI...
void OnGUI(){
GUI.Label(new Rect(250,150,750,100)," Look! A stylized slice of GUI!","customBox");
}
}
So… I went to the inspector, eager to assign my 2d texture to this customBox I declared, I did so and then nothing happens.
I mean, I play start and something do happen: no simple rectangle appears, and text is somehow paint in red…
This means something is working somewhere but then why my image is not displayed?
If it’s a matter concerning the 2d texture I’m trying to apply let me know, because in this case I’ll edit my question to include more details.
Thanks for the patience, it must be my bad but I can’t find the error by myself!