# Render the object

**URL:** https://discussions.unity.com/t/render-the-object/395779
**Category:** Graphics
**Tags:** Scripting
**Created:** [August 1, 2009, 4:01pm UTC](https://discussions.unity.com/t/render-the-object/395779 "2009-08-01T16:01:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_92685416](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon\_92685416](https://discussions.unity.com/u/anon_92685416)
#### Post date: [August 1, 2009, 4:01pm UTC](https://discussions.unity.com/t/render-the-object/395779/1 "2009-08-01T16:01:57Z")

</div>

How do I turn on/off the render of a object

like the object collide with water then turn the render on …

---

<div class="post-metadata">

### Author: ![anon\_20903479](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@anon\_20903479](https://discussions.unity.com/u/anon_20903479)
#### Post date: [August 1, 2009, 4:24pm UTC](https://discussions.unity.com/t/render-the-object/395779/2 "2009-08-01T16:24:17Z")

</div>

The easiest way is to use the renderer.enabled

```auto
renderer.enabled = true;

```

If you turn on all the renderers of any object that hits this object perhaps something like this would work for you…

```auto
void OnCollisionEnter (Collision collisionInfo)
{
    foreach(Renderer r in collisionInfo.gameObject.GetComponentsInChildren(typeof(Renderer)))
   {
      r.enabled = true;
   }
}

```

---

<div class="post-metadata">

### Author: ![anon\_92685416](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon\_92685416](https://discussions.unity.com/u/anon_92685416)
#### Post date: [August 1, 2009, 5:34pm UTC](https://discussions.unity.com/t/render-the-object/395779/3 "2009-08-01T17:34:02Z")

</div>

Thanks, that’s what I was looking for
