0
\$\begingroup\$

I am trying to change texture offset in a material by a script to create a parallax effect, but it doesn't move a bit no matter what I am trying. Any tips for this case? Or am I missing something?

enter image description here enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Please post your code as text, not as an image. Text is better for searching, accessibility, and copy-pasting for trying to replicate problems or include snippets in answers. \$\endgroup\$
    – DMGregory
    Mar 7 '18 at 14:49
  • \$\begingroup\$ Sorry. I will. Is there any convenient way to post code? When I just Ctrl + V it make quite a mess. \$\endgroup\$ Mar 7 '18 at 14:52
  • \$\begingroup\$ Select your code and press the button that looks like {} to format it correctly. \$\endgroup\$
    – DMGregory
    Mar 7 '18 at 14:53
1
\$\begingroup\$

Figured it out. Should have used SetTextureOffset method. https://docs.unity3d.com/ScriptReference/Material.SetTextureOffset.html

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .