|
I can't figure what is the name of this component, so I'll try to describe it somehow. When selecting a mesh in the inspector, there are 2 textures displayed. One texture is accessible trough
How can I accesses the other texture? Thanks.
(comments are locked)
|
|
Different shaders which have multiple textures will have an internal variable name for each texture. As you've shown, the common name for the main diffuse texture is "_MainTex", and some other names used in some of Unity's built in shaders are:
You can also access the "_MainTex" more conveniently by using the .mainTexture property of the Material class like this: Excellent explanation, Thanks a lot!
Nov 19 '10 at 12:10 PM
Samuel
is there a list of this somewhere we can view / can I access the Illumin map?
Jul 12 '11 at 07:25 AM
vivalarosa
@mehowe7: What shader do you use? Not every shader has every texture variable. The variable names in this answer are common names, but noone stops a shader-author to use something completely different. btw. don't post question as answers to other questions!!! If you have further questions on this topic, ask your own question. But first think about it. What's your concrete question. What information is necessary to understand your question. Ask one question at a time and phrase it as clearly as possible. Include all "relevant" code, don't post the whole script
Jan 03 '12 at 03:49 PM
Bunny83
(comments are locked)
|
