<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n" -->

---
title: Customize the main toolbar with Unity Toolbars API
description: A step-by-step walkthrough shows how to use Unity 6.3's new Toolbars API to customize the main editor toolbar. It covers editing the default toolbar layout...
canonical: https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Customize the main toolbar with Unity Toolbars API | daily.dev
og:description: A step-by-step walkthrough shows how to use Unity 6.3's new Toolbars API to customize the main editor toolbar. It covers editing the default toolbar layout...
og:url: https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n
og:image: https://api.daily.dev/og/posts/eK7Pl3G4N.png
og:image:alt: Customize the main toolbar with Unity Toolbars API
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize the main toolbar with Unity Toolbars API

**[Unity](https://daily.dev/sources/unity)** · 15 min read · 1 upvotes · 0 comments

## Summary

A step-by-step walkthrough shows how to use Unity 6.3's new Toolbars API to customize the main editor toolbar. It covers editing the default toolbar layout (hiding elements, resetting to presets), then building custom toolbar elements in C# using the MainToolbarElement attribute, MainToolbarButton, and MainToolbarContent classes. Two working examples are built: a button that opens Project Settings and a button that creates a cube at the world origin, complete with undo support and scene view framing, illustrating how small editor tools can reduce repetitive workflow friction.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=oMEdG5oA7PI>

## Questions this post answers

### How do I add a custom button to Unity's main editor toolbar in Unity 6.3?

Create a static factory method decorated with the MainToolbarElement attribute inside a script placed in an Editor folder, specifying a menu path and a DefaultDockPosition (left, middle, or right). The method returns a MainToolbarButton built with MainToolbarContent (icon, text, tooltip) and a lambda or named function defining the click action, such as opening Project Settings or creating a game object.

_Developers customizing Unity editor workflows can track new API breakdowns like this one on daily.dev._

### What Unity version introduced the Toolbars API for customizing the editor toolbar?

Unity 6.3 introduced the Toolbars API, letting developers add their own buttons, drop-downs, and workflow tools to the editor toolbar without building a full editor extension. Elements are registered via the MainToolbarElement attribute and rendered using MainToolbarButton and MainToolbarContent classes from the UnityEditor.Toolbars namespace.

_Follow Unity editor tooling changes like this one on daily.dev before they affect your workflow._

### How do I make a custom-created GameObject support undo in the Unity editor?

Call Undo.RegisterCreatedObjectUndo, passing the newly created object instance and a string name for the undo action, right after instantiating it with GameObject.CreatePrimitive. Skipping this step still creates the object, but undo will not work correctly, making custom editor tools feel broken or unprofessional.

_Developers writing custom Unity editor tools can find practical patterns like this on daily.dev._

## Similar posts on daily.dev

- [Hands-On UI Toolkit Tutorials For Unity Devs](https://daily.dev/posts/hands-on-ui-toolkit-tutorials-for-unity-devs-uiybcyb9o) · 80 LEVEL · 0 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#game-development](https://daily.dev/tags/game-development), [#c#](https://daily.dev/tags/c#), [#unity](https://daily.dev/tags/unity)

[View this post on daily.dev](https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Customize the main toolbar with Unity Toolbars API","url":"https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n"},"datePublished":"2026-09-14T20:00:43.341Z","dateModified":"2026-09-14T20:01:07.676Z","description":"A step-by-step walkthrough shows how to use Unity 6.3's new Toolbars API to customize the main editor toolbar. It covers editing the default toolbar layout...","image":"https://i.ytimg.com/vi/oMEdG5oA7PI/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/oMEdG5oA7PI/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Unity","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Unity","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9afe038cc27e4d95ad581284cea8578d","url":"https://daily.dev/sources/unity"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devtools,game-development,c#,unity","timeRequired":"PT15M","video":{"@type":"VideoObject","name":"Customize the main toolbar with Unity Toolbars API","description":"A step-by-step walkthrough shows how to use Unity 6.3's new Toolbars API to customize the main editor toolbar. It covers editing the default toolbar layout...","thumbnailUrl":"https://i.ytimg.com/vi/oMEdG5oA7PI/sddefault.jpg","uploadDate":"2026-09-14T20:00:43.341Z","duration":"PT15M","url":"https://api.daily.dev/r/eK7Pl3G4N","embedUrl":"https://www.youtube.com/embed/oMEdG5oA7PI"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Unity","item":"https://daily.dev/sources/unity"},{"@type":"ListItem","position":3,"name":"Customize the main toolbar with Unity Toolbars API"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/customize-the-main-toolbar-with-unity-toolbars-api-ek7pl3g4n#faq","mainEntity":[{"@type":"Question","name":"How do I add a custom button to Unity's main editor toolbar in Unity 6.3?","acceptedAnswer":{"@type":"Answer","text":"Create a static factory method decorated with the MainToolbarElement attribute inside a script placed in an Editor folder, specifying a menu path and a DefaultDockPosition (left, middle, or right). The method returns a MainToolbarButton built with MainToolbarContent (icon, text, tooltip) and a lambda or named function defining the click action, such as opening Project Settings or creating a game object. Developers customizing Unity editor workflows can track new API breakdowns like this one on daily.dev."}},{"@type":"Question","name":"What Unity version introduced the Toolbars API for customizing the editor toolbar?","acceptedAnswer":{"@type":"Answer","text":"Unity 6.3 introduced the Toolbars API, letting developers add their own buttons, drop-downs, and workflow tools to the editor toolbar without building a full editor extension. Elements are registered via the MainToolbarElement attribute and rendered using MainToolbarButton and MainToolbarContent classes from the UnityEditor.Toolbars namespace. Follow Unity editor tooling changes like this one on daily.dev before they affect your workflow."}},{"@type":"Question","name":"How do I make a custom-created GameObject support undo in the Unity editor?","acceptedAnswer":{"@type":"Answer","text":"Call Undo.RegisterCreatedObjectUndo, passing the newly created object instance and a string name for the undo action, right after instantiating it with GameObject.CreatePrimitive. Skipping this step still creates the object, but undo will not work correctly, making custom editor tools feel broken or unprofessional. Developers writing custom Unity editor tools can find practical patterns like this on daily.dev."}}]}
```

