Objects passing through each other?

How can I make it that one object can pass through certain objects but not other objects
for example my character needs to pass through all the objects tagged as “trans” but other objects should not be able to pass through those objects?

Would I use tags to turn the collider on and off?

You have 2 solutions that are pretty easy.

  1. Get a list of all your walls, then have them all ignore collisions between the wall and the player.

     for( var wall in Walls ) {
           Physics.IgnoreCollision( wall, player);
     }
    
  2. Use layers, and put the player and the walls in special layers. Then go to the physics manager and turn off collisions between those 2 layers.