Change material or transparency?

If either scenario is equally applicable, which would be the most sensible option?

  1. Change gameobject from material1 to material2. (no alpha necessary)
  2. Change alpha from 100% to 0%.

Would the answer depend on the number of gameobjects involved?

I’m not sure if any other details might be necessary.

Thanks.

Changing transparency from 100% to 0% makes no sense, changing material for the same purpose either.

If you want to hide object, just disable MeshRenderer.

obj.renderer.enabled = false;

I would still need collision, though. That wouldn’t be an issue? I feel a bit dumb now : /

Beauty of a component-driven engine like Unity: turning the Renderer component off has nothing to do with the other components (such as a Collider).

No need to feel dumb. Asking questions is part of learning!

1 Like