material.color in HDRP get error

hi all!
in my code I need to change a material color, if I’m using HDRP it get error 'cause tell me that the _Color property is not valid, so I need to use

material.GetColor("_BaseColor")...

it’s a right stuff what I do?

thank you

If you use material.color to get and assign the color it should work. This will get / set _Color for the built in renderer, and get / set _BaseColor for the URP / HDRP.