Search Unity

Turn off geometry

Discussion in 'Editor & General Support' started by jtw, Jun 2, 2009.

  1. jtw

    jtw

    Joined:
    Jan 21, 2008
    Posts:
    30
    Hi,

    I have a script for switching mesh renderer on and off. The problem is that the collision is still on when turning off the mesh renderer.
    Is it possible to switch collision on and off as well?


    Thanks,
     
  2. magwo

    magwo

    Joined:
    May 20, 2009
    Posts:
    402
    Yes, look at gameObject.collider.