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?
-
\$\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, 2018 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\$– Random generalistMar 7, 2018 at 14:52
-
\$\begingroup\$ Select your code and press the button that looks like {} to format it correctly. \$\endgroup\$– DMGregory ♦Mar 7, 2018 at 14:53
1 Answer
Figured it out. Should have used SetTextureOffset method. https://docs.unity3d.com/ScriptReference/Material.SetTextureOffset.html