O'Reilly logo

Extending Unity with Editor Scripting by Angelo Tadres

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing the Scene View

In this section we are going to take a look how to create a custom GUI in the Scene View and change its default behavior.

Using the OnSeceneGUI message method

To start rendering a GUI in Scene View, we are going to make use of a message method part of the Editor class, OnSeceneGUI.

In terms of GUI creation, we can make use of all the techniques we learned in the previous chapters working with custom inspectors and editor windows. In this case, we are going to use a toolbar component like the one used in the Palette window to simulate the tabs.

To see how this works, we are going to create a toolbar attached to the left top corner of the scene view. Each item of this toolbar will be one of the possible modes.

Let's add this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required