I see the value flipping in the console when I play the level in the editor, but the object itself does not become visible. Instead, when I stop playing the level the prefab has been changed so that its renderer is active. When I start the level the next time all instances of it are visible by default.
How can I make the individual instance of the GameObject prefab visible without also changing the prefab's properties in the editor?
From your code, it looks as if you are having a couple of static properties in "TerrainGameObject" which you are changing and which would explain the behavior you're seeing. If you are changing the prefab itself (instead of the instance of the prefab), you'd probably get the same behavior (seeing that every instance has changed). So either you're having static references, or references to the actual prefab which both probably isn't what you really want.
Instead of changing the prefab from code during runtime (which I think may not even be supported) you should probably find a reference to the actual instance in which you want to apply that change, and then make your change there. As a code convention, member variables of your scripts should be camelCase because PascalCase is used for classes (and methods).
So, there might be something in your code like:
public TerrainGameObject terrainGameObject;
Then, when you either drag a GameObject with a component of type TerrainGameObject into the relevant slot in the editor, or find the reference to the game object via some other means, you should be able to call:
The language ErikS writes in is C#, so those articles should apply. Notice that MS recommends Pascal casing for "all public member, type, and namespace names consisting of multiple words."
I.e.,
public TerrainGameObject TerrainGameObject;
Would comply with C# naming conventions, since it's a public member. Camel Case is used in C# solely for parameters.