GUI Box Change Background Image

I have a gui skin, under Box -> Normal -> Background I set it to female.png image

How do I change it with Javascipt?

Thanks, Chris

All the GUISkin properties are accessible by scripting. See the reference.

In particular, what you need is this:

` GUI.skin.box.normal.background = myTexture; `

You have to create your materials with the different textures, then "switch" at runtime the material used by that object.

GameObject.renderer.material = mynewmaterial;