I’m able to set the color of the child object by changing parentColor to something like Color.cyan – so I think the problems lies in that I’m not getting the color of the parent correctly. Any insight on a solution would be greatly appreciated.
Just one child object per parent? If that’s true, I think you’d want :
Color parentColour = GetComponentsInParent<Renderer>()[1].material.color;
hopefully I didn’t mess up that syntax. GetComponentInParent returns for its own GameObject, as well as any parents (ie: in your code snippet, you’re probably catching the child’s color and then just re-applying it to itself, and because you’re using the singular version, it returns only the one).
If the child’s depth is greater, you could adjust the index, and if it’s a random depth, perhaps a script on the parent that stores its color, and then any children can search for the Component in their parents by that script’s name.
Hopefully that works & makes sense.