All… I have wrestled with this problem for a week now.
The following code does not work and gives this error:
Ambiguous reference’Button’
// Variables
private var gamobjTexture : Object[] = Resources.LoadAll("picConWomCleCon", Texture2D);
// GUI
function OnGUI ()
{
GUI.Button (Rect (0, 0,64,60), gamobjTexture[1]);
}
Alternately:
private var gamobjTexture : Texture2D[] = Resources.LoadAll("picConWomCleCon", Texture2D);
Gives this error:
InvalidCastException: Cannot cast from source type to destination type.
Am I missing something obvious?
This will save me a lot of time if I can get this going.
Thanks.