ES2.LoadImage
Parameters
path | The absolute path of the JPG or PNG file we wish to load. |
Returns
Texture2D | Our loaded audio as a Texture2D." |
Description
Loads a JPG or PNG image as a Texture2D.
See Texture2D.LoadImage for more details.
C#
1 2 |
// Load a local JPG file to the material assigned to this object renderer.material.mainTexture = ES2.LoadImage("C:/Users/User/Documents/MyImage.jpg"); |
JS
1 2 |
// Load a local JPG file to the material assigned to this object renderer.material.mainTexture = ES2.LoadImage("C:/Users/User/Documents/MyImage.jpg"); |