- Home /
Textures from array variabels?
is it possible to assign a Texture into the variable of an array, then as the player changes this variable with a button control, changing the image the array is attatched?
Example, if I make an array, with 10 variables, I want each variable to be a different texture, So there are 10 different characters the player can choose from, or is this a poor idea to have the player pick different characters in the game?
I code in Csharp, and please, give me advice or refrence or tutorials, do not write this script for me :) thanks in advance..
Answer by Evil-Dog · Jul 03, 2011 at 11:25 PM
Here's a gross answer, you can have 1 character model and different textures for the different character looks. Keeping an array with your 10 materials, the player can choose which one he wants and in the code you'd change the renderer.material propery to swap the material to the desired one
ahh, render.material, I shall go see what this does, thanks for the advice ;D
Your answer
![](https://koobas.hobune.stream/wayback/20220612132122im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Simple C# array for changing textures 1 Answer
Changing texture of pressed button in array 1 Answer
Texture2D to Texture3D 2 Answers