ES2.LoadImage
public static Texture2D LoadImage(string path)
Parameters
[table th=”0″]path,”The absolute path of the JPG or PNG file we wish to load.”[/table]
Returns
[table th=”0″]Texture2D,”Our loaded audio as a Texture2D.”[/table]
Description
Loads a JPG or PNG image as a Texture2D.
See Texture2D.LoadImage for more details.
C#
// Load a local JPG file to the material assigned to this object renderer.material.mainTexture = ES2.LoadImage("C:/Users/User/Documents/MyImage.jpg");
JS
// Load a local JPG file to the material assigned to this object renderer.material.mainTexture = ES2.LoadImage("C:/Users/User/Documents/MyImage.jpg");