NavMesh baking is the process of creating a navigation mesh that defines walkable areas for AI agents in a game scene. It helps characters find paths around obstacles.
Click to reveal answer
beginner
Which Unity component is required to bake a NavMesh?
The component required is the NavMeshSurface. It marks the area where the NavMesh will be generated.
Click to reveal answer
intermediate
What does the 'Agent Radius' setting affect during NavMesh baking?
Agent Radius defines how close the AI agent can get to obstacles. A larger radius means the agent keeps more distance from walls and objects.
Click to reveal answer
beginner
Why should you mark static objects as 'Navigation Static' before baking?
Marking objects as 'Navigation Static' tells Unity these objects won't move, so they are included in the NavMesh calculation to block or allow paths correctly.
Click to reveal answer
intermediate
What happens if you bake a NavMesh without any obstacles marked as static?
The NavMesh will treat the scene as fully walkable, ignoring obstacles, so AI agents may walk through walls or objects.
Click to reveal answer
What is the main purpose of NavMesh baking in Unity?
ATo create a map of walkable areas for AI navigation
BTo bake textures onto 3D models
CTo optimize lighting in the scene
DTo generate particle effects
✗ Incorrect
NavMesh baking creates a navigation mesh that AI agents use to find paths around obstacles.
Which component do you add to a GameObject to define the NavMesh baking area?
AMeshRenderer
BNavMeshAgent
CNavMeshSurface
DCollider
✗ Incorrect
NavMeshSurface defines the area where the NavMesh will be baked.
What does setting an object as 'Navigation Static' do?
AMakes it invisible to the camera
BMarks it as unmovable for NavMesh calculations
CDisables physics on the object
DAllows the object to move during gameplay
✗ Incorrect
Navigation Static means the object won't move and is included in NavMesh baking.
If the Agent Radius is too small, what might happen?
AThe agent will move faster
BThe agent will jump higher
CThe agent will ignore the NavMesh
DThe agent may get too close to obstacles and get stuck
✗ Incorrect
A small radius can cause the agent to try to squeeze through tight spaces and get stuck.
What is the effect of baking a NavMesh without marking obstacles as static?
AAI agents may walk through obstacles
BThe NavMesh will be smaller
CThe scene will render slower
DThe NavMesh will be invisible
✗ Incorrect
Without static obstacles, the NavMesh treats the whole area as walkable.
Explain the steps to bake a NavMesh in Unity for a simple scene.
Think about preparing the scene and then generating the navigation data.
You got /4 concepts.
Describe how the Agent Radius setting influences AI movement on a NavMesh.
Consider how the agent's size affects its path.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of NavMesh baking in Unity?
easy
A. To create a walkable map for characters to navigate
B. To add textures to 3D models
C. To animate characters automatically
D. To generate sound effects for the environment
Solution
Step 1: Understand NavMesh baking concept
NavMesh baking generates a navigation mesh that defines where characters can walk.
Step 2: Identify the purpose from options
Only To create a walkable map for characters to navigate describes creating a walkable map, which matches NavMesh baking.
Final Answer:
To create a walkable map for characters to navigate -> Option A
Quick Check:
NavMesh baking = walkable map creation [OK]
Hint: NavMesh baking = making paths for characters [OK]
Common Mistakes:
Confusing NavMesh baking with animation
Thinking it adds textures
Assuming it creates sounds
2. Which of the following is the correct way to start baking a NavMesh using the NavMeshSurface component in a script?
easy
A. navMeshSurface.Bake();
B. navMeshSurface.StartBake();
C. navMeshSurface.GenerateNavMesh();
D. navMeshSurface.CreateMesh();
Solution
Step 1: Recall NavMeshSurface API method
The official method to bake NavMesh in script is Bake().
Step 2: Match method names with options
Only navMeshSurface.Bake(); uses Bake(), others are incorrect or non-existent.
Final Answer:
navMeshSurface.Bake(); -> Option A
Quick Check:
NavMeshSurface baking method = Bake() [OK]
Hint: Use Bake() method to bake NavMesh in scripts [OK]
Common Mistakes:
Using non-existent methods like StartBake()
Confusing with GenerateNavMesh() or CreateMesh()
Forgetting to call Bake() after setup
3. Consider this code snippet in Unity:
using UnityEngine;
using UnityEngine.AI;
public class BakeNavMesh : MonoBehaviour {
public NavMeshSurface surface;
void Start() {
surface.BuildNavMesh();
Debug.Log("NavMesh baked");
}
}
What will be the output when this script runs?
medium
A. NavMesh baked
B. Error: BuildNavMesh() does not exist
C. No output, script does nothing
D. NavMesh baking failed
Solution
Step 1: Check NavMeshSurface API
NavMeshSurface does not have BuildNavMesh(); the correct method is Bake(). This causes a compilation error.
Step 2: Analyze execution
The invalid method call prevents compilation, so no Debug.Log executes and an error occurs.
Final Answer:
Error: BuildNavMesh() does not exist -> Option B
Quick Check:
NavMeshSurface.Bake() exists, BuildNavMesh() does not [OK]
Hint: NavMeshSurface uses Bake(), not BuildNavMesh() [OK]
Common Mistakes:
Thinking BuildNavMesh() is valid
Expecting 'NavMesh baked' log output
Confusing BuildNavMesh() with Bake()
4. You wrote this code to bake a NavMesh but it does not work:
public NavMeshSurface surface;
void Start() {
surface.BakeNavMesh();
}
What is the error and how to fix it?
medium
A. NavMeshSurface cannot bake at runtime
B. NavMeshSurface must be initialized with new keyword
C. Method name is wrong; use surface.Bake() instead
D. BakeNavMesh() needs parameters to work
Solution
Step 1: Identify incorrect method call
NavMeshSurface does not have BakeNavMesh() method; correct is Bake().
Step 2: Correct method usage
Replace surface.BakeNavMesh() with surface.Bake() to bake NavMesh properly.
Final Answer:
Method name is wrong; use surface.Bake() instead -> Option C
Quick Check:
Correct method = Bake() [OK]
Hint: Use Bake(), not BakeNavMesh(), to bake NavMesh [OK]
Common Mistakes:
Calling non-existent BakeNavMesh() method
Trying to create NavMeshSurface with new keyword
Assuming Bake needs parameters
5. You want to bake a NavMesh only on specific layers to optimize performance. Which approach should you use in Unity?
hard
A. Bake the entire scene and disable obstacles on unwanted layers
B. Manually delete unwanted NavMesh areas after baking
C. Use a separate NavMeshSurface for each layer but bake all layers together
D. Set the NavMeshSurface's LayerMask to include only desired layers before baking
Solution
Step 1: Understand LayerMask usage in NavMeshSurface
NavMeshSurface has a LayerMask property to select which layers to include in baking.
Step 2: Choose the best optimization method
Setting LayerMask before baking limits NavMesh to needed layers, improving performance.
Final Answer:
Set the NavMeshSurface's LayerMask to include only desired layers before baking -> Option D
Quick Check:
LayerMask filters layers during baking [OK]
Hint: Use LayerMask on NavMeshSurface to bake specific layers [OK]
Common Mistakes:
Deleting NavMesh areas manually after baking
Baking whole scene without filtering layers
Using multiple surfaces but baking all layers at once
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.