Recall & Review
beginner
What is a tag in Unity?
A tag is a label you assign to a GameObject to identify it easily in your scripts. For example, you can tag all enemies with "Enemy" to find them quickly.
Click to reveal answer
beginner
What is a layer in Unity?
A layer is a way to group GameObjects for rendering and physics purposes. Layers help control which objects interact or are visible to cameras.
Click to reveal answer
beginner
How do you check a GameObject's tag in a script?
You use
gameObject.CompareTag("TagName") or check gameObject.tag == "TagName" to see if it has a specific tag.Click to reveal answer
intermediate
Why use layers for physics collisions?
Layers let you control which objects collide by setting collision rules in the Physics settings. This improves performance and game logic.Click to reveal answer
beginner
Can a GameObject have multiple tags or layers?
No, a GameObject can have only one tag and one layer at a time. But you can create custom tags and layers to organize your objects better.
Click to reveal answer
What is the main purpose of tags in Unity?
✗ Incorrect
Tags help you identify and find GameObjects in your scripts quickly.
How many tags can a GameObject have at once?
✗ Incorrect
A GameObject can have only one tag at a time.
What is a common use of layers in Unity?
✗ Incorrect
Layers help control physics collisions and rendering visibility.
Which method is recommended to check a GameObject's tag in code?
✗ Incorrect
CompareTag is the recommended and efficient way to check tags.
Can layers affect camera visibility?
✗ Incorrect
Cameras can be set to render or ignore specific layers.
Explain the difference between tags and layers in Unity and give an example of when to use each.
Think about how you find objects vs how you control collisions or visibility.
You got /4 concepts.
Describe how you would use layers to optimize physics collisions in a Unity game.
Consider how layers can prevent unnecessary collision checks.
You got /4 concepts.