I got a problem.
I model with blender and 2 different models wont light map. what is going on.
they are static and everything so what?
GUITexture is a type, but you’re using it like a variable.
Example of using it as a type on a MonoBehaviour Script:
var fogTexture : GUITexture; // Assigned in inspector
var cachedTransform : Transform;
function Start() {
cachedTransform = transform; // CACHE YOUR TRANSFORM, OTHERWISE YOU TAKE A HIT
}
// ... some other functions
function Update() {
if (cachedTransform.position.y < 2.95)
fogTexture.enabled = true;
}
Also as a note, please cache your transform, if you don’t each time the Update function is called, unity will do a look up, it’s better to cache that reference and continue to use it throughout the life time of the script/GameObject