x


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..

more ▼

asked Jul 03 '11 at 11:06 PM

Spittin_fire gravatar image

Spittin_fire
16 6 7 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Jul 03 '11 at 11:25 PM

Evil-Dog gravatar image

Evil-Dog
372 13 18 26

ahh, render.material, I shall go see what this does, thanks for the advice ;D

Jul 06 '11 at 12:09 PM Spittin_fire
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4171
x2207
x1363

asked: Jul 03 '11 at 11:06 PM

Seen: 1398 times

Last Updated: Jul 06 '11 at 12:09 PM