- Home /
Question by
rebelarcher · Mar 16, 2019 at 10:02 AM ·
texturespritemultiple objects
How can i set multiple Texture or Sprite with script?
i want make a theme shop. like this :
when i click one by one i want change ball theme... i can attach textures but those must have button script. Cause i want make buy button for those.
asdasd.png
(56.5 kB)
Comment
Answer by billybob1978 · Mar 17, 2019 at 01:47 AM
put a script on your ball. Make a texture array. drag all the textures in.
Have a function that changes the texture in your script that takes in an integer.
Make each button launch that function and pass the variable in with the function starting at 0.
Your answer
Follow this Question
Related Questions
UI Sprite very pixelated 1 Answer
Mask a texture onto sprite? 0 Answers
Created Material Shows Dark Sprite 1 Answer
Sprite rendering texture as one solid color 1 Answer
Bad quality of the sprite in Unity 0 Answers