Search code examples
c#unity-game-engineunity3d-shadersurp

Edit Offset Values in Unity URP Lit Shader via Script


I want to edit the Offset Parameter of Surface Input in Simple Lit Shader of URP in Unity, but I am not able to do so.

I tried using Method SetTextureOffset still cannot update the offset value. Please Help

Here is the Offset I want to change via Script -

enter image description here


Solution

  • Got it,

    Instead of "_MainTexture" use "_BaseMap" in SetTextureOffset and it works