x


Changing material or texture on a Projector

I have been trying to find a way to change the material on my projectoir.

I have done everything I can think of from

proj.material.SetTexture( "_MainTex", newTex )

proj.material = newMaterial

proj.material.mainTexture = newTex

I just can't seem to figure it out.

any help would be great thank you

more ▼

asked May 15 '10 at 08:29 PM

Mike 4 gravatar image

Mike 4
37 7 7 10

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

2 answers: sort voted first

As Eric5h5 said, this works great for me:

projector.material.SetTexture("_ShadowTex", texture);

more ▼

answered Dec 08 '12 at 08:16 AM

gotys gravatar image

gotys
1

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

Look in the projector shader to see what the names of the properties are that you should change with SetTexture. (As I recall, in this case it's "_ShadowTex".)

more ▼

answered May 15 '10 at 08:32 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

That didn't seem to work for me either.

May 15 '10 at 08:48 PM Mike 4

Did this get any further? I am also trying to get this exact issue to work but I also cant get this answer to work. Mike did you ever solve it?

Jul 25 '12 at 05:39 PM adgrist
(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:

x813
x109

asked: May 15 '10 at 08:29 PM

Seen: 1589 times

Last Updated: Dec 08 '12 at 08:16 AM