Sets if object is visible and has collision/physics.
void setVisible(this obj object, bool visible)
Type: obj
Type: bool
- When object is set to invisible, all constraints associated with it will be deleted.
// Here's how an object can be invisible, while also having physics:
object obj
obj.setVisible(true)
on LateUpdate
{
obj.setVisible(false)
}