- Home /
Make Camera not render individual GameObject?
Is there a way to make a Camera not render an individual GameObject, without placing it on a layer and setting the Camera to not cull it?
I have multiple cameras viewing that GameObject, and want it to show up in one but not the other.
Thank you for any help!
Yes - I have multiple instances of the same GameObject, and want only one of them to not be shown. From what I know, if you make a camera not cull a layer, it does not show any of the GameObjects on that layer.
Answer by qJake · Sep 07, 2010 at 12:22 AM
You either need to use layers and culling, or just disable the renderer on the object:
gameObject.renderer.enabled = false;
Edit: Oh, you said multiple cameras, I missed that. In that case, you need to use layers and culling, that's the only way (and the intended purpose of the layer system).
Note that disabling the renderer will prevent it from appearing on the other cameras that are viewing it.
Sorry, SpikeX, I forgot to mention that I have multiple instances of the same GameObject (as I said in the comment above). For this reason, (as far as I know) I cannot use the layer system.
Your answer
Follow this Question
Related Questions
Semi transparent Object behind walls? 1 Answer
Unculled particle system rendering 1 Answer
How do off-camera gameobjects affect performance? 1 Answer
gameObject.renderer.isVisible = false for one frame after activation 1 Answer
Planes and other Gameobjects disppear as I dolly/rotate the camera and in render mode 0 Answers