CodeBlanks Logo Icon CodeBlanks

Summary - Custom tool

Reinforce custom tool usage with a summary task.

Custom Tool Architecture Summary

Unity editor extension tools streamline production workflows and eliminate human errors. MenuItem binds commands to top menus, EditorWindow provides dockable standalone panels, CustomEditor reshapes Inspector inspectors, and Gizmos/Handles supply in-scene interactive visuals.

[MenuItem("Tools/Panel")]
static void Open() => EditorWindow.GetWindow<Panel>();

Practice Report Editor Tool State

Print Debug.Log("Arac: " + aracAdi); followed by Debug.Log("Durum: " + pencereAcik);.

Starter code

Player.cs
using System;

public static class Debug
{
    public static void Log(object message) => Console.WriteLine(message);
}

public class Program
{
    public static void Main()
    {
        string aracAdi = "SeviyeEditörü";
        bool pencereAcik = true;
        // Arac adini ve pencere durumunu sirayla yazdir
    }
}

Sample solution

Player.cs
using System;

public static class Debug
{
    public static void Log(object message) => Console.WriteLine(message);
}

public class Program
{
    public static void Main()
    {
        string aracAdi = "SeviyeEditörü";
        bool pencereAcik = true;
        Debug.Log("Arac: " + aracAdi);
        Debug.Log("Durum: " + pencereAcik);
    }
}

Expected output

Arac: SeviyeEditörü
Durum: True

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which of the following is used directly inside the Scene view to provide visual guides and interactive 3D handles for developers?

  • MenuItem and Shortcuts
  • AudioListener and ReverbZone
  • Rigidbody and Collider
  • Gizmos and Handles Correct answer

Explanation: Gizmos and Handles classes are used to render visual guides and draggable handles in the Scene view.

2 Summary Window Opening

Question
EditorWindow.____<OzelArac>();
Answer
EditorWindow.GetWindow<OzelArac>();

Explanation: To retrieve and display an EditorWindow instance, the GetWindow method is used.

3 All Custom Tool Concepts

Term Meaning
MenuItem Adds clickable command to menu bar
EditorWindow Creates new window dockable in Unity
CustomEditor Customizes component's Inspector UI
Gizmos Draws visual lines in Scene view

All lessons in Expert