Changing Color/Material using HDRP,Modify The Color of a HDRP material
I am currently trying to modify the color of a material on my objects. I tried by changing directly the color.. No result Changing the material with a new material that has the right color, No results either.
I tryied to google Documentation for referencing of the HDRP properties and I found nothing either.
So here's my code :
 /// <summary>
     /// Set the color for the gameObjects in the path
     /// </summary>
     /// <param name="gridsToColor"> An array containing the grid of prefabs to color</param>
     public void SetGridColor(List<GameObject> gridsToColor)
     {
         for(int i = 0; i < gridsToColor.Count; i++)
         {
             gridsToColor[i].GetComponent<Renderer>().materials[0] = pathColorOuterLayer;
             gridsToColor[i].GetComponent<Renderer>().materials[1] = pathColorInnerLayer;
 
         }
     }
 
               I simply try to assign a new material to the gameobject. With some debug it finds the right gameObject but simply the material is never assigned.... And I do NOT want transfer my project to a downgrade version
Your answer
 
             Follow this Question
Related Questions
Sprite2D CG shader: No errors, but not displaying anything 1 Answer
Texture offset not working with shader 0 Answers
Accessing shader colors 1 Answer
How to make a surface glow when its hit by a laser. 0 Answers
,Trying to change custom boolean properties of a shadergraph with EnableKeyword 1 Answer