Bird
Raised Fist0
Unityframework~20 mins

Unity Editor interface - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Unity Editor 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 Unity Editor script?
Consider this Unity Editor script that adds a menu item. What will be printed in the Console when you click the menu item Tools/Show Message?
Unity
using UnityEditor;
using UnityEngine;

public class EditorTest
{
    [MenuItem("Tools/Show Message")]
    public static void ShowMessage()
    {
        Debug.Log("Hello from Unity Editor!");
    }
}
AMenu item not found error
BHello from Unity Editor!
CNothing happens
DCompilation error
Attempts:
2 left
💡 Hint
Look at the Debug.Log statement inside the method called by the menu item.
🧠 Conceptual
intermediate
1:30remaining
Which Unity Editor window is used to inspect and modify GameObject properties?
In the Unity Editor interface, which window lets you see and change the properties of a selected GameObject?
AProject window
BHierarchy window
CInspector window
DConsole window
Attempts:
2 left
💡 Hint
This window shows details about the selected object.
🔧 Debug
advanced
2:30remaining
Why does this custom Editor script cause an error?
This script tries to create a custom inspector for a component but causes an error. What is the cause?
Unity
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(MyComponent))]
public class MyComponentEditor : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        if (GUILayout.Button("Press Me"))
        {
            Debug.Log("Button pressed");
        }
    }
}

public class MyComponent : MonoBehaviour
{
    public int value;
}
AThe class MyComponentEditor must be inside an Editor folder
BMyComponent must inherit from Editor
CThe method OnInspectorGUI must return a value
DThe script is missing 'using UnityEditor;'
Attempts:
2 left
💡 Hint
Custom Editor scripts must be placed in a special folder.
📝 Syntax
advanced
2:00remaining
What error does this Unity Editor script produce?
What error will this script cause when compiled in Unity Editor?
Unity
using UnityEditor;
using UnityEngine;

public class EditorExample
{
    [MenuItem("Tools/Do Something")]
    public static void DoSomething()
    {
        Debug.Log("Doing something");
    }

    [MenuItem("Tools/Do Something", true)]
    public static bool ValidateDoSomething()
    {
        return false;
    }
}
ASyntaxError: missing semicolon or closing brace
BSyntaxError: missing return statement
CSyntaxError: missing colon
DSyntaxError: missing semicolon
Attempts:
2 left
💡 Hint
Check the last line of the ValidateDoSomething method.
🚀 Application
expert
3:00remaining
How many items will appear in the Unity Editor's Project window after this script runs?
This Editor script creates assets in the Project window. How many assets will be visible after running the script?
Unity
using UnityEditor;
using UnityEngine;

public class AssetCreator
{
    [MenuItem("Tools/Create Assets")]
    public static void CreateAssets()
    {
        for (int i = 0; i < 3; i++)
        {
            var asset = ScriptableObject.CreateInstance<ScriptableObject>();
            AssetDatabase.CreateAsset(asset, $"Assets/Asset{i}.asset");
        }
        AssetDatabase.SaveAssets();
    }
}
A3
B4
C1
D0
Attempts:
2 left
💡 Hint
Count how many times the loop runs and creates assets.

Practice

(1/5)
1. Which Unity Editor panel shows all the objects currently in your game scene?
easy
A. Project panel
B. Hierarchy panel
C. Inspector panel
D. Console panel

Solution

  1. Step 1: Understand the purpose of the Hierarchy panel

    The Hierarchy panel lists all game objects currently in the active scene, showing their structure and relationships.
  2. Step 2: Compare with other panels

    The Project panel shows assets, Inspector shows details of selected objects, and Console shows messages and errors.
  3. Final Answer:

    Hierarchy panel -> Option B
  4. Quick Check:

    Objects in scene = Hierarchy panel [OK]
Hint: Hierarchy = scene objects list panel [OK]
Common Mistakes:
  • Confusing Project panel with Hierarchy panel
  • Thinking Inspector shows all objects
  • Mixing Console with object lists
2. Which of the following is the correct way to open the Console panel in Unity Editor?
easy
A. Window > General > Console
B. Edit > Console
C. File > Console
D. Assets > Console

Solution

  1. Step 1: Recall Unity Editor menu structure

    The Console panel is accessed via the Window menu, under General, then Console.
  2. Step 2: Verify other options

    Edit, File, and Assets menus do not contain Console panel options.
  3. Final Answer:

    Window > General > Console -> Option A
  4. Quick Check:

    Console panel location = Window > General > Console [OK]
Hint: Console is under Window > General [OK]
Common Mistakes:
  • Looking for Console under Edit or File menus
  • Trying to find Console in Assets menu
  • Assuming Console opens automatically
3. Given this code snippet in a Unity script attached to a GameObject, what will the Inspector panel show for the 'speed' variable after you change it in the script and save?
public class Player : MonoBehaviour {
    public float speed = 5f;
}
medium
A. A slider to adjust speed value
B. No speed variable visible
C. A numeric field showing 5
D. An error message in Console

Solution

  1. Step 1: Understand public variables in Unity scripts

    Public variables like 'speed' appear in the Inspector as editable fields showing their current value.
  2. Step 2: Determine the field type for float

    Floats show as numeric input fields, not sliders by default.
  3. Final Answer:

    A numeric field showing 5 -> Option C
  4. Quick Check:

    Public float = numeric field in Inspector [OK]
Hint: Public float shows numeric field in Inspector [OK]
Common Mistakes:
  • Assuming all floats show sliders
  • Expecting no variable to appear without [SerializeField]
  • Thinking script errors show in Inspector
4. You try to drag a texture from the Project panel to a GameObject in the Scene, but nothing happens. What is the most likely reason?
medium
A. The GameObject does not have a Renderer component
B. The texture is not imported correctly
C. The Console panel is closed
D. The Project panel is locked

Solution

  1. Step 1: Understand how textures apply to GameObjects

    Textures can only be applied to GameObjects with Renderer components (like MeshRenderer) that display materials.
  2. Step 2: Check other options

    Incorrect import would show errors, Console panel state does not affect drag-drop, and Project panel locking does not exist.
  3. Final Answer:

    The GameObject does not have a Renderer component -> Option A
  4. Quick Check:

    Texture drag needs Renderer component [OK]
Hint: GameObject needs Renderer to accept textures [OK]
Common Mistakes:
  • Ignoring Renderer component requirement
  • Thinking Console panel affects drag-drop
  • Assuming Project panel can be locked
5. You want to organize your assets better in the Project panel by creating folders and moving assets inside. Which steps correctly describe how to do this?
hard
A. Folders are created automatically when you import assets; no manual action needed
B. Use the Hierarchy panel to create folders and drag assets there
C. Drag assets directly into the Scene to create folders automatically
D. Right-click in Project panel > Create > Folder, then drag assets into the folder

Solution

  1. Step 1: Create folders in Project panel

    Right-click inside the Project panel and select Create > Folder to make a new folder.
  2. Step 2: Move assets into folders

    Drag and drop assets from the Project panel into the new folder to organize them.
  3. Step 3: Verify incorrect options

    Hierarchy panel manages scene objects, not assets; dragging assets into Scene does not create folders; folders are not auto-created on import.
  4. Final Answer:

    Right-click in Project panel > Create > Folder, then drag assets into the folder -> Option D
  5. Quick Check:

    Create folders in Project panel manually [OK]
Hint: Create folders via right-click in Project panel [OK]
Common Mistakes:
  • Trying to create folders in Hierarchy panel
  • Expecting folders auto-created on import
  • Dragging assets into Scene to organize
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard