Material property _MainTex offset/scale incompatible with SpriteRenderer

Hello,

It seems that with latest versions of unity (>= 2021.2.7f1) material texture offset is not compatible anymore with Sprite Renderers.

After searching, I found a solution with 3D Quad objects:

  • 2 Quad objects, one per background layer
  • Background Images type must be set to “Default” instead of 2D sprite, and corresponding materials will be generated in a ./Materials folder in the sprite directory
  • Corresponding Materials must be assigned to each Quad Mesh renderer component
  • Environment Lighting should be set up in Window/Rendering/Lighting to have the textures lit properly
  • A simple script should be created to handle the scrolling by manipulating Renderer.material.mainTextureOffset value

I hope this helps someone, also I would be interested if someone found another solution, especially with 2D Objects only :slight_smile:

Privacy & Terms