Enable meshrenderer from all objects in array

Hello everyone,

I’ve been searching for a solution for my problem on the web, but as far as I tried now, these didn’t come up with the solution yet.
I have an array of gameobjects colorStamps, with their Meshrenderers disabled by default.
When my player gets a specific pickup, the “ShowPath()” function is being called and the MeshRenderers from all the colorStamp gameobjects in the array should enable.
In the Unity Editor it works like a charm, but when I build to iOS, the meshes don’t show/ stay disabled.

public void ShowPath()
    {
        colorStamps = GameObject.FindGameObjectsWithTag("PathBlocks");

        for (int i = 0; i < colorStamps.Length; i++)
        {
           TheMesh = colorStamps[i].gameObject.GetComponent<MeshRenderer>() as MeshRenderer;
            TheMesh.enabled = true;
        }

I’ve read that the GetComponent could return a component, instead of an MeshRenderer, so I already tried the ‘as MeshRenderer’ at the end of the declaration line so I tried with and without. Also, I’ve read that in iOS, the shortcut for GetComponent().enable could give problems, but separating them didn’t fix it either. Last but not least, yes, the colorStamps objects are tagged with the PathBlocks tag and the colorStamps GameObject[ ] is declared on top of the script. Plus, yeah, it does work in the editor, so it has to be something in the conversion to iOS?
What am I doing wrong?
Thanks for your help!

GetComponent() always returns an object of the type you requested, so no need to do any casting. The shortcut of calling GetComponent().enable has been working for us for several years.

I suggest you add logging and see what is happening, for example by printing out which gameobjects GameObject.FindGameObjectsWithTag() returns.