The editor allows you to browse and manipulate all files in your game project in an efficient manner. Editing files brings up a suitable editor and shows all relevant information about the file in separate views.
The Defold editor is separated into a set of panes, or views, that display specific information.
The old editor looks different but works very much the same, only with less functionality.
Lists all the files that are part of your project. You click and scroll to navigate the list. All file oriented operations can be made in this view:
The center view shows the currently open file in an editor for that file type. In all visual editors you can navigate the camera:
The menu Scene contains tools to move, rotate and scale the currently selected object, options to frame the view to the current selection and to realign the camera. Editor 2 contains a toolbar in the top right where you find the move, rotate and scale tools.
This view shows the content of the file currently being edited, but in a hierarchial tree structure. The outline reflects the editor view and allows you to perform operations on your items:
This view shows properties associated with the currently selected item, like Position, Rotation, Animation etc, etc.
This view shows any error output or purposeful printing that you do while your game is running. Alongside the console are tabs containing the Curve Editor which is used when editing curves in the particle editor, the Build Errors view that shows build errors, and the Search Results view that displays search results.
This view lists any files that has been changed, added or deleted in your project. By synchronizing the project regularly you can bring your local copy in sync with what is stored in the project Git repository, that way you can collaborate within a team, and you won’t lose your work if unfortune strikes. Some file oriented operations can be performed in this view:
Defold contains a number of editors, but the Scene Editor is the one used the most. All Game Objects and Collections, as well as some component types, are created and edited in this editor.
Click on objects in the main window to select them. The rectangle surrounding the object in the editor view will highlight green to indicate what item is selected.
You can also select objects by:
Hold Shift or ⌘ (Mac) or Ctrl while clicking to expand the selection.
To move objects, use the Move Tool. It is accessible through the menu Scene ▸ Move Tool or by pressing the W key.
The selected object now shows three manipulation points that are used to move the object. Click and drag in the green square to move the object freely:
You can also move the object along just one selected axis by clicking and dragging along the corresponding arrow. Clicking and dragging on the red arrow allows movement on the X axis only whereas clicking and dragging on the green arrow allows movement on the Y axis only.
Hold Shift when using the move tool to snap the center of the game object to the grid. The default grid size is set to 100. If you wish to alter the size of the grid, you can specify a custom grid size in the preferences. Select Defold Editor ▸ Preferences…
The Rotate Tool is accessible through the menu Scene ▸ Rotate Tool or by pressing the E key.
This tool consists of three handles that you can manipulate. If you are working on 2D objects, you would probably only want to use the handle that rotates around the Z axis, which is the blue circle around the object. Click and drag on the circle to rotate the object.
If you want to rotate around the X or Y axis, click and drag on the green and red circles. Since the view is peripendicular to those axis, the circles only appear as two lines crossing the object: a green horizontal one and a red vertical.
The Scale Tool is accessed through the menu Scene ▸ Scale Tool or by pressing the R key.
Click the red or green handle and drag to scale the object. Game objects can be scaled freely along the X and Y axis, causing the object to stretch or compress visually.
Currently, sprites can not be scaled in the editor. They do, however, support runtime free-form scaling. See the 2D Graphics documentation for details.
It is often convenient to be able to disable the visual rendering of certain types of information in the Scene Editor, especially when you are working on a complicated collection with lots of objects containing physics, triggers and layers upon layers of graphical assets. The Scene Editor allows you to enable and disable the rendering of different types of information in the editor. Select the Scene ▸ Show submenu and then chose what you want to see in the editor.
The choices you make are stored in the editor and apply to all Scene Editor instances. Your choices are rememberered between sessions too so if you close the Defold editor down and start it up the next day, your Show settings will be intact.