Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Texture[] TextureArray;
- int n = 0;
- void OnGUI()
- {
- if (GUI.Button(new Rect(0,0,100,100), TextureArray[n]))
- {
- n++;
- if (n>=TextureArray.Length)
- {
- n = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement