Hi all.
var firstTexture: Texture;
var Map1 : Texture;
function OnGUI() {
if (GUI.Button(Rect(10,15,50,50),firstTexture))
Debug.Log("Clicked the button with an image");
if (GUI.Button(Rect(5,75,60,30),"Danger")){
Debug.Log("Clicked the button with text");
renderer.material.mainTexture=map1;
}
}
This script is working this way but when I try to add an info button for example when you click the button with text, it doesn’t show. Now, maybe I’m writting the function not properly which is most likely happening. Can anyone point me on how to make the multiline text field here? Also tried the text field from the reference but didn’t work out. Thanks.