Change render of all children

I am trying to fade in some 3D text. Problem is I have multiple 3D objects that all need to fade in. I don’t want to attach a script to each object that calls the update function.

Here is what I want to do (but don’t know how to do it).

create an empty gameObject and place each 3Dtext as a child of that gameObject.

Create a script that will be on the gameObject that will access each child’s render component and change the alpha value.

Can anyone show me a piece of code to get this working? I think I have the correct logic but not sure how to write it properly in C#.

I am programing in c#

This will give you access to all the child renderers that are parented to your empty GameObject.

Renderer[] renderers = GetComponentsInChildren<Renderer>();
foreach (var r in renderers)
{
    // Do something with the renderer here...
    r.enabled = false; // like disable it for example. 
}