Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unable to set Sprite Renderer texture though SetTexture() (Unity 2019.3.0b12, URP 7.1.5)

Discussion in '2D Experimental Preview' started by fogsight, Nov 26, 2019.

  1. fogsight

    fogsight

    Joined:
    Apr 6, 2010
    Posts:
    65
    All packages are up-to-date. Same code on the same shader works in LineRenderer, while accessing _MainTex property. In Sprite Renderer I can see it being set in the material, but it is never set to the sprite itself.

    Am I missing something? Anybody experienced this as well?

    P.S. Using sprite property instead and assigning sprite from the texture reference works.
     
    Last edited: Nov 26, 2019