- Home /
Read Y offset value of a Texture
Hi
I need to read the Y offset value off an animated texture. Once this value is reached I plan to call a function. It is easy enough to animate the texture, I just can't seem to read it. I would need it as a float.
Any help would be appreciated Thanks
What's happening? If you can write to the y offset, why can't you read from it? At the very least, can't you keep track of what you're writing to it, and refer to that ins$$anonymous$$d?
Answer by NecrosDk · Nov 02, 2012 at 11:24 AM
Use:
renderer.material.GetTextureOffset("_Maintext");
to get the Vector2 that is the offset of the material. I don't know if you can fill in a .y between TextureOffset and ("_Main ....
Your answer
Follow this Question
Related Questions
Scrolling Texture scrolls both maps. Only want single map to scroll? 0 Answers
Import animated normal map 0 Answers
can't offset normal map 1 Answer
Offset detail texture in c# 1 Answer