I’m trying to create a side menu hub that contains a vertical scrollable list of menu items with icons and no text. I have a game object that I created to represent this menu and I created the following script to show the first button:
#pragma strict
//not implemented yet
var selectObjectIcon : Texture2D;
var buttonDimensions : float;
var buttonStyle : GUIStyle;
function OnGUI () {
Debug.Log("testinggg!");
if(GUILayout.Button("testing if i can click this")){
Debug.Log("i can click this!!");
}
GUILayout.BeginArea(Rect(Screen.width-buttonDimensions, 0, buttonDimensions, Screen.height));
GUILayout.BeginVertical();
if(GUILayout.Button(selectObjectIcon, buttonStyle)){
Debug.Log("select object pressed");
}
GUILayout.EndVertical();
GUILayout.EndArea();
}
and I attached it to my menu game object. The menu appears correctly but none of the debug statements are being printed to the command line when I deploy on my Android device. If I play in Unity, all the debug messages are printed to the command line. Why are they not appearing when I deploy to an actual device and how can I fix that?