Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved MaterialProperty is not working

Discussion in 'Entity Component System' started by Remus-Croft, Dec 4, 2020.

  1. Remus-Croft

    Remus-Croft

    Joined:
    Mar 7, 2015
    Posts:
    3
    I have custom shader for GPU animation with float variable _Speed for animation speed.
    MaterialPropertyBlock worked just fine for per instance speed change. I made some tweaks in shader for DOTS, but component with MaterialProperty attribute is not working without any errors. Any ideas how to fix it?
    upload_2020-12-4_18-55-30.png upload_2020-12-4_19-5-59.png upload_2020-12-4_19-7-9.png upload_2020-12-4_19-9-3.png upload_2020-12-4_19-12-46.png

    SOLVED: Wrong URP version was installed.
     
    Last edited: Dec 6, 2020
  2. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    299
    From what I can see it looks ok. Are there errors logged out? Does the shader show SPR batcher compatible in the inspector?

    EDIT: You haven't shown the full shaders so hard to know for sure but you might also require:
    Code (CSharp):
    1. #pragma multi_compile_instancing
    2. #pragma multi_compile _ DOTS_INSTANCING_ON
     
  3. Remus-Croft

    Remus-Croft

    Joined:
    Mar 7, 2015
    Posts:
    3
    No errors. Yes, it is compatible.
     
  4. Remus-Croft

    Remus-Croft

    Joined:
    Mar 7, 2015
    Posts:
    3
    Yes, I have those as well.
    upload_2020-12-4_21-24-30.png