Changing Material Color in Unity
Objective: change the color of the camera cone when the player is caught by the security cameras.
In this case I opened the security camera script and declared a variable to get the reference to the mesh renderer.
Then in the ActiveCutscene coroutine I declared a new color variable and assigned a red color. Then I used the function rendere.material.SetColor and passed the name of the property I wanted to change (in this case _TintColor) and the new color I created.
And just with those 2 lines we can see how the camera cone changes its color when the player is caught.