unity3d - How to load image from resource folder and set it to source image of UI Image in unity5 -


how load image resource folder , set image source image of ui image?

place sprite in folder begins resources, e.g. mine in "resources/images/test"

[serializefield] private unityengine.ui.image image = null;  private void awake() {     if( image != null )     {         image.sprite = resources.load<sprite>( "images/test" );     } } 

http://docs.unity3d.com/462/documentation/scriptreference/ui.rawimage.html http://docs.unity3d.com/scriptreference/resources.load.html


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -