- Home /
Question by
Himani_123 · Jun 11, 2014 at 05:53 AM ·
instantiate
how to store the texture
i am creating the cubes run time,which have textures right now i am just storing the position of cubes in vector array..i want to store the textures of the cubes also..Is it possible,how can i do it..??
Comment
Best Answer
Answer by korbul · Jun 11, 2014 at 07:51 AM
Of course. Unity offers Texture2D class. You can find the reference here
http://docs.unity3d.com/ScriptReference/Texture2D.html
You can keep a vector array of Texture2D that you created at run-time, or are already existing.
Hope that helps
@Himani_123 please accect the answer as true, however if you are using a plugin like NGUI, you can use UISprite for example.