0
0
Unityframework~20 mins

Game engine architecture overview in Unity - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Game Engine Mastery
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 Unity C# script?

Consider this simple Unity script attached to a GameObject. What will be printed in the console when the game starts?

Unity
using UnityEngine;

public class TestScript : MonoBehaviour
{
    void Start()
    {
        Debug.Log("Game engine architecture overview");
    }
}
AGame engine architecture overview
BStart method not called
CNullReferenceException
DNo output
Attempts:
2 left
💡 Hint

Start() is called once when the game begins for active GameObjects.

🧠 Conceptual
intermediate
1:30remaining
Which component is responsible for rendering in a game engine?

In a typical game engine architecture, which component handles drawing objects on the screen?

ARendering Engine
BPhysics Engine
CAudio Engine
DInput Manager
Attempts:
2 left
💡 Hint

Think about which part turns data into images you see.

🔧 Debug
advanced
2:30remaining
Why does this Unity script cause a NullReferenceException?

Examine the code below. Why does it cause a NullReferenceException when run?

Unity
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    public GameObject weapon;

    void Start()
    {
        weapon.SetActive(true);
    }
}
AThe script is missing a constructor.
BSetActive(true) is not a valid method for GameObject.
CStart() method is not called automatically.
DThe 'weapon' variable is not assigned in the Inspector, so it is null.
Attempts:
2 left
💡 Hint

Check if 'weapon' has a value before calling methods on it.

📝 Syntax
advanced
1:30remaining
Identify the syntax error in this Unity C# script snippet

Find the syntax error in the following code snippet:

Unity
using UnityEngine;

public class Enemy : MonoBehaviour
{
    void Update()
    {
        if (health <= 0)
            Destroy(gameObject);
    }
}
AUpdate method must return a value
BMissing semicolon after Destroy(gameObject)
CIncorrect method name 'Destroy' should be 'destroy'
DMissing parentheses in if condition
Attempts:
2 left
💡 Hint

Check line endings carefully in C#.

🚀 Application
expert
2:00remaining
How many main subsystems are typically in a game engine architecture?

Most game engines have several main subsystems. How many are commonly considered core parts?

A3
B7
C5
D9
Attempts:
2 left
💡 Hint

Think about rendering, physics, audio, input, and scripting.