top of page
Level Editor
Introduction

At the end of our project Spite: Divine Descent, I consulted our Level Designers about developing an internal Level Editor instead of using Unity as the editor and exporting the scenes with JSON files to our engine.
 

The Goal

My goal with the editor was to make it easy to build upon and for others to implement their tools. The most important aspect of the development process was to maintain open communication with my colleagues on the design team, which enabled me to iterate on the editor with the ease of their workflow in mind.

Implementation

Throughout my time as a student I have been using Dear ImGui, which made my choice of graphical user interface simple and the process of setting up the editor’s framework quick.


For the editor, I designed a Window class that takes care of all the essentials for a new window to be created and updated. With it, all that is required of the user is to bind an update function for the logic to the window. It also supports error management by letting the user return early in their update loop without having to deal with the GUI logic that would crash the application.

Core Features

  • Viewport

  • Scene hierarchy

  • Asset browser

  • Inspector

  • Customizable camera controls

  • Foliage brush

  • Prefab system

  • Profiler window

  • Reflection system

  • Mouse-picking

  • Multi selection of entities

  • Mass replace prefabs

  • Drag and drop

  • Duplication of entities 

Reflection system

With user friendliness as the number one priority, I wanted the amount of boilerplate code for the other programmers to be reduced as much as possible when implementing or editing components.

devenv_dVpVAiyLof.png

I opted to program a macro which serves to create a templated function that iterates through the variables in a struct. The inspector then calls upon this function, goes through all the reflected variables, checks if the data type is supported, and if it is, it will be displayed like all other variables of that data type. If the data type is not supported, the user may simply add it to a list and instruct the program how said data type is to be handled.

ApplicationFrameHost_cZfJYxH3GL.png

Due to the time constraints of the project, I was unable to design the system perfectly to my liking. If I had the time to redesign the system, I would have serialized the struct into a binary file which would in turn be used for serializing and deserializing the entities for

the scene with the help of version numbers for backwards compatibility.

Moving Forward

  • Implementing a search function in the hierarchy and asset browser.

  • Assigning thumbnails to prefabs and model files to simplify navigation of the asset browser.

  • Implementing a better shader for the visualization of selected entities.

bottom of page