0
0
Unityframework~20 mins

NavMesh baking in Unity - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
NavMesh Baking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this NavMesh baking status check?
Consider this Unity C# script snippet that checks the NavMesh baking status. What will be printed in the console?
Unity
using UnityEngine;
using UnityEngine.AI;

public class NavMeshStatusCheck : MonoBehaviour
{
    void Start()
    {
        var buildSettings = NavMesh.GetSettingsByID(0);
        Debug.Log($"Agent Type ID: {buildSettings.agentTypeID}");
        Debug.Log($"Voxel Size: {buildSettings.voxelSize}");
    }
}
AAgent Type ID: 1\nVoxel Size: 0.15
BAgent Type ID: 0\nVoxel Size: 0.3
CAgent Type ID: 1\nVoxel Size: 0.3
DAgent Type ID: 0\nVoxel Size: 0.15
Attempts:
2 left
💡 Hint
The default agent type ID for the first NavMesh agent is 0, and the default voxel size is 0.3.
🧠 Conceptual
intermediate
1:30remaining
Which component is essential for NavMesh baking in Unity scenes?
In Unity, to bake a NavMesh for AI navigation, which component must be present on the GameObjects that define walkable surfaces?
ANavMeshSurface
BNavMeshLink
CNavMeshObstacle
DNavMeshAgent
Attempts:
2 left
💡 Hint
This component defines the area where the NavMesh is generated.
🔧 Debug
advanced
2:30remaining
Why does this NavMesh baking code fail to update the NavMesh?
This Unity C# code attempts to bake a NavMesh at runtime but does not update the navigation mesh as expected. What is the cause?
Unity
using UnityEngine;
using UnityEngine.AI;

public class RuntimeNavMeshBake : MonoBehaviour
{
    public NavMeshSurface surface;

    void Start()
    {
        surface.BuildNavMeshAsync();
        Debug.Log("NavMesh baking started.");
    }
}
ANavMeshSurface requires Bake() instead of BuildNavMeshAsync() for runtime baking.
BBuildNavMeshAsync is deprecated and does not work at runtime.
CNavMeshSurface must be disabled before baking.
DBuildNavMeshAsync returns a JobHandle that must be completed to finish baking.
Attempts:
2 left
💡 Hint
Async baking returns a handle that controls job completion.
📝 Syntax
advanced
1:30remaining
Identify the syntax error in this NavMesh baking code snippet.
Which option contains the correct syntax to bake a NavMesh using NavMeshSurface in Unity?
Unity
public class BakeNavMeshExample : MonoBehaviour
{
    public NavMeshSurface surface;

    void Bake()
    {
        // Bake the NavMesh here
    }
}
Asurface.BuildNavMesh();
Bsurface.BuildNavMeshAsync();
Csurface.BakeNavMesh();
Dsurface.BuildNavMeshAsync
Attempts:
2 left
💡 Hint
Check the exact method name and usage.
🚀 Application
expert
3:00remaining
How many NavMesh areas are created after this baking setup?
You have a Unity scene with two NavMeshSurface components. One is set to include only the "Walkable" layer, and the other includes only the "Jump" layer. After baking both surfaces, how many distinct NavMesh areas will exist?
ANo NavMesh areas because layers cannot be baked separately
BOne combined NavMesh area including both layers
CTwo distinct NavMesh areas, one for each layer
DMultiple areas merged into a single NavMeshSurface automatically
Attempts:
2 left
💡 Hint
Each NavMeshSurface bakes its own area based on included layers.