I can’t seem to get this working. The file is in the specified folders with the correct name and this always returns null.
Can anyone tell me what I’m doing wrong? This is in JS.
function OnDrawGizmos () {
var MyTexture : Texture2D = Resources.Load("Assets/Resources/EditorIcons/TimeEventIcon.png") as Texture2D;
Gizmos.DrawGUITexture(Rect(0, 0, 20, 20), MyTexture);
//Gizmos.DrawGUITexture(Rect(0, 0, 20, 20), Resources.Load("Assets/Resources/EditorIcons/TimeEventIcon") as Texture2D);
}