Invisible walls and floor still show up in game

I have made my walls and floors with cubes, on the inspector I have the layer set to TransparentFX and i have unchecked Mesh Renderer. When I build the apk and run it, the objects are visible. Has something changed? Is there a better way to handle this with a script?

Delete “Mesh Filter” and “Mesh Renderer” Components on the objects.