Unity3D Layers & Tags

Layers and tags are two simple Unity systems that help you organize objects and control how they behave. Beginners often see them in the Inspector but are not sure when they actually matter.

The short version is:

  • Tags help identify what an object is
  • Layers help control how systems treat that object

They are small features, but they become very useful once your project has more than a few objects in it.

Recommended Setup

Use tags for identity and layers for filtering, then keep the project naming small enough that you can still explain it later.

  1. Decide whether the object needs an identity label, a system filter, or both.
  2. Create only the tags and layers needed by a real script, camera, raycast, or collision rule.
  3. Test with the actual VRChat interaction, camera, pickup, or trigger that depends on it.
VRChat note

VRChat projects can use layers for interaction filtering, pickups, mirrors, cameras, local-only helpers, and SDK/world systems. Avoid changing SDK-related or imported prefab layers unless you know why they were set that way.

Quick Difference

System Answers Often used by
Tag What kind of object is this? simple scripts, triggers, object lookup
Layer Which systems should include or ignore this object? cameras, lights, raycasts, physics, collisions

One GameObject can have one tag and one layer. They are both useful, but they solve different problems.

What Tags Are For

A tag is a label assigned to an object so scripts or systems can identify it by category.

For example, a tag might be used to identify:

  • player objects
  • enemies
  • interactables
  • pickups
  • triggers

In practical terms, tags answer the question:

What kind of object is this?

Tags are best when the object identity matters more than low-level filtering. For example, a trigger might check whether the entering object is tagged as Player.

What Layers Are For

A layer is used more for system behavior and filtering.

Layers are commonly used for things like:

  • collision rules
  • raycasts
  • camera culling
  • interaction filtering
  • lighting masks
  • editor and helper object visibility

In practical terms, layers answer the question:

How should Unity systems treat this object?

Unity layers are especially important because cameras can use culling masks, physics can use layer collision rules, and scripts can raycast against selected layers.

Why Beginners Get Them Mixed Up

Both are short labels found in the Inspector, so it is easy to confuse them.

A useful distinction is:

  • tag = identity
  • layer = system behavior/filtering

If you only remember that difference, you will already avoid a lot of confusion.

When Tags Are Useful

Tags are useful when a script needs to check what kind of object it is dealing with.

Examples:

  • a trigger checks whether the entering object is the player
  • an interaction script checks whether something is tagged as interactable
  • a system checks whether an object should be treated as a collectible

Tags are usually about classification.

Keep tag use simple. If you need many detailed categories, a script component, prefab structure, or naming convention may be clearer than dozens of tags.

When Layers Are Useful

Layers are useful when you want Unity systems to include or exclude certain object groups.

Examples:

  • a camera should ignore some objects
  • a raycast should only hit specific types of objects
  • some objects should not collide with others

Layers are usually about filtering and control.

Examples in VRChat world work might include:

  • interaction raycasts hitting only interactable objects
  • mirrors excluding helper objects
  • cameras showing a specific prop group
  • collision rules separating triggers from walkable geometry
  • utility objects being ignored by gameplay checks

Camera, Raycast, And Collision Examples

Layers matter most when a Unity system asks what it should include.

Use case What the layer controls
Camera culling mask which layers that camera renders
Raycast layer mask which colliders a raycast can hit
Physics collision matrix which layers can collide with each other
Light culling mask which layers a light affects

If a camera cannot see something, a raycast misses something, or an object collides when it should not, layer settings are one of the first places to check.

A Good Beginner Approach

Do not create a huge complicated system of custom tags and layers immediately.

Start small:

  • create only the tags you actually need
  • create only the layers that support a clear workflow
  • name them clearly

That keeps the project understandable.

Before adding a new layer, ask:

  1. Which system will use this layer?
  2. What should happen if an object is on this layer?
  3. Is there already a layer serving the same purpose?
  4. Will imported VRChat or asset-prefab setup be affected?

Examples of Sensible Use

Tags

You might use tags such as:

  • Player
  • Interactable
  • Pickup

Layers

You might use layers for:

  • world geometry
  • interactable objects
  • trigger helpers
  • ignored utility objects
  • camera-only helpers
  • interaction targets

The exact setup depends on the project, but the important part is that the purpose stays obvious.

How to Choose Between a Tag and a Layer

Ask:

Do I need to identify what this object is?

Use a tag.

Do I need to control whether systems include, ignore, or filter this object?

Use a layer.

That simple decision rule helps a lot.

Why Good Naming Matters

Poor names make the system harder to maintain.

Good names:

  • clearly describe purpose
  • stay consistent
  • avoid ambiguity

Bad names:

  • are too vague
  • overlap in meaning
  • only make sense to the person who created them once

If another person reads the project later, the tag or layer should still make sense.

Common Beginner Mistakes

Using tags and layers interchangeably.

They are related, but not the same thing. Tags describe identity; layers control filtering and system behavior.

Creating too many too early.

A small clear system is better than a big confusing one. Add tags and layers when a real script, camera, raycast, or collision rule needs them.

Using unclear names.

If the meaning is not obvious, the project becomes harder to maintain. Prefer names that describe the rule or purpose, not a vague personal shorthand.

Forgetting to assign them consistently.

If only some relevant objects use the expected tag or layer, scripts and interactions may appear unreliable. Check prefab roots and child objects too.

Changing imported prefab layers without checking dependencies.

Some prefabs rely on layer setup for cameras, interactions, triggers, or SDK behavior. Duplicate and test before changing layers across a complex prefab.

Practical Advice

  • Use tags for identity
  • Use layers for filtering and system rules
  • Keep names simple
  • Add only what the project genuinely needs
  • Stay consistent once you choose a structure
  • document unusual layer choices in the scene or prefab notes
  • test the actual camera, raycast, collision, or interaction behavior

Why This Matters More Later

In tiny projects, layers and tags may feel optional. In larger projects, they become much more useful because they help reduce confusion and make systems easier to reason about.

That is why it is worth understanding them early, even if your first project only uses a few.

Helpful follow-up pages

Final Advice

Layers and tags are small tools, but they help bring order to a growing project.

If you use them with clear intent:

  • tags say what the object is
  • layers say how systems should treat it

That simple approach will cover most beginner use cases without making the project unnecessarily complicated.

Related Navigation

References