A collection of ready-to-use toolbar buttons and utilities for the Unity Editor. These scripts are designed to simply drop into your project to enhance your workflow with Play Mode controls, Scene switching, and more.
Note: This repository is a collection of extension scripts. It relies on the Unity-Utils package to function.
These extenders use the Toolbar system provided by Unity-Utils. You must install this package for the scripts to work.
Install via Package Manager (Git URL):
- Open the Package Manager in Unity.
- Click the
+button in the top left. - Select Add package from git URL...
- Enter:
https://github.com/adammyhre/Unity-Utils.git
Or via manifest.json:
Add the following line to your Packages/manifest.json:
"com.gitamend.unityutils": "https://github.com/adammyhre/Unity-Utils.git"
- Ensure the Prerequisites are met.
- Open the Package Manager in Unity.
- Click the
+button in the top left. - Select Add package from git URL...
- Enter the git URL of this repository:
https://github.com/cihaneray/unity-toolbar-extender.git
Or via manifest.json:
Add the following line to your Packages/manifest.json:
"com.cihaneray.toolbar-extension": "https://github.com/cihaneray/unity-toolbar-extender.git"
The collection includes several useful tools located in the Editor folder.
File: MainToolbarPlayModeToggles.cs
Dock Position: Middle
A comprehensive set of tools for Play Mode interactions:
- Focused Start: Enters Play Mode and automatically focuses the Game View.
- Pause/Continue: Toggles the pause state of the editor.
- Maximize on Play: Toggles the "Maximize on Play" setting.
- Mute Audio: Toggles the "Mute Audio" setting.
- Error Pause: Toggles "Error Pause" (pause execution when an exception occurs).
- Reload Scene: Reloads the currently active scene (Play Mode only).
- Start From Scene:
- Toggle: Enable/Disable forcing the game to start from a specific scene.
- Selector: Choose which scene to always start from (e.g. your Main Menu), regardless of which scene you are currently editing.
Scene Switcher
- File:
MainToolbarSceneSwitcher.cs - Dock Position: Left
- Description: A dropdown menu to quickly switch between scenes that are enabled in the Build Settings.
Scene Object Counter
- File:
MainToolbarSceneObjectCount.cs - Dock Position: Middle
- Description: Displays the current number of GameObjects in the active scene. Updates automatically when the hierarchy changes.
Time Scale Controls
- File:
MainToolbarTimescaleSlider.cs - Dock Position: Right
- Description: A streamlined button to monitor and control
Time.timeScale. Text updates in real-time.- Click: Opens a popup with a precise slider (0x - 5x) and quick presets (Pause, 0.1x, 0.5x, Normal, 2x, 5x).
Project Settings
- File:
MainToolbarButtons.cs - Dock Position: Middle
- Description: A shortcut button to open the Project Settings window.
You can create your own toolbar elements using the [MainToolbarElement] attribute.
using UnityEditor;
using UnityEditor.Toolbars;
using UnityEngine;
namespace Editor
{
public static class MyCustomToolbar
{
[MainToolbarElement("MyTools/SayHello", defaultDockPosition = MainToolbarDockPosition.Right)]
public static MainToolbarElement HelloButton()
{
return new MainToolbarButton(
new MainToolbarContent("Hello"),
() => Debug.Log("Hello World!")
);
}
}
}For advanced styling, the included MainToolbarElementStyler.cs helper allows you to manipulate the visual elements (VisualElements) of the toolbar buttons, useful for adjusting padding, icons, or layout.

