In a js file, i defined a var with type Texture2D, and also attach a img to it in the Inspector, but how to display it?
function OnGUI ()
{
GUI.DrawTexture (Rect (0, 0, 50, 50), theImageName);
}
i would like to warn though that using OnGui on the iphone is quite taxing on the phone ![]()
It’s not a big deal if you are using UnityGUI for a main menu. Also you can set useGUILayout = false; for a 50% GUI performance boost.