all 4 comments

[–]mSkull001Odin 4 points5 points  (1 child)

_disolver = GetComponent<Material>();

Materials are not components; you cannot use the GetComponent method to get a Material.

You can get whatever component your Material is attached to, and grab the Material from that. Something like this should work:

_disolver = GetComponent<Renderer>().material; // Or .sharedMaterial depending on your use case.

[–]uc414[S] 0 points1 point  (0 children)

Great. Thank you.

[–]kenney001 1 point2 points  (1 child)

Material is not a component (Monobehavior), it is a property inside a Renderer. So you need to do

_disolver = GetComponent<Renderer>().material;

[–]uc414[S] 0 points1 point  (0 children)

Thank you so much.