Nice solution.
You could add each object to an array as it is hidden, then remove each object from the array when unhidden. At the point the player is visible you can loop through the remaining objects stored in the array, turning each mesh renderer back on as you go.
Thanks for the suggestion Doh,
I messed around with arrays for quite a while but couldn't get them to work the way I needed(probably due to my own lack of knowledge however).
Although I did find another solution to my issue. This is how the final product works:Two raycasts shoot towards a player. Raycast 1 detects objects with the layer "Hide". Raycast 2 detects objects with the layer "Unhide".
When Raycast 2 detects a collider attached to the player with the layer "Unhide" any previously seen wall has it's visibility set to true.
When Raycast 1 detects a game object with the layer "Hide" it runs a check. To start this check I first add the value 1 to an int variable. Then I compare the int. If it has a value of 1, this must be the first object it has seen. Therefore, set the game object as variable "Wall 1" and set it's visibility as false. Then loop back into the raycasts.
If an int greater than 1 is found, set the game object as variable "Wall 2". Then set the visibility of "Wall 1" to true and the visibility of "Wall 2" to false. After this, replace "Wall 1" with the game object used in "Wall 2" and set the int variable back to 1. Then loop back to the raycasts again.
In short, when the raycasts move directly from one wall to another they will only hide the wall/object which is directly infront of the player while making sure to unhide and previously hidden walls the player was behind before.
Thanks again for the help guys! I hope this is of some use to others.