Search Unity

How to map texture references when changing to URP shaders

Discussion in 'Universal Render Pipeline' started by swProdBdk, Mar 23, 2021.

  1. swProdBdk

    swProdBdk

    Joined:
    Apr 22, 2020
    Posts:
    10
    Hi,
    I'm upgrading my project from built-in RP to URP.
    I have a lot of materials that use a very simple custom shader. I've found an equivalent shader on the URP side of things. All the materials carry a texture. It is in the _MainTex property. When I change the Shader to "My simple lit" then there is no mapping between _BaseMap and _MainText. I know this is because the two properties are named differently and that I manually can drag and drop. I just have a lot of these and it will take me a ton of time to manually drag and drop all of them.

    Is there a way / or a workaround to automatically map what assigned and referenced with _MainText to _BaseMap?
    upload_2021-3-23_12-14-9.png

    upload_2021-3-23_12-14-57.png