Introduction to Open 3D Engine’s Lua Editor

The O3DE Lua Editor (Lua IDE) offers an intuitive integrated development environment (IDE) that makes it easy to author, debug, and edit Lua scripts when you create or extend your game. Lua Editor is a standalone application, but can be opened directly from the O3DE Editor using the Edit Mode toolbar.

Editing

Lua Editor can open multiple scripts at the same time. Each script has its own tab in the editor. The editor provides a standard set of capabilities for text editing but also includes useful features for editing source code.

The following table summarizes the options available while editing and debugging.

ActionKeyboard Shortcut
Comment selected blockCtrl+K
CopyCtrl+C
CutCtrl+X
FindCtrl+F
Find in open filesCtrl+Shift+F
Find nextF3
Fold source functionsAlt+0
Go to lineCtrl+G
PasteCtrl+V
Quick find localCtrl+F3
Quick find local reverseCtrl+Shift+F3
RedoCtrl+Y
ReplaceCtrl+R
Replace in open filesCtrl+Shift+R
Select allCtrl+A
Select to brace¹Ctrl+Shift+]
Transpose lines downCtrl+Shift+Down Arrow
Transpose lines upCtrl+Shift+Up Arrow
Uncomment selected blockCtrl+Shift+K
UndoCtrl+Z
Unfold source functionsAlt+Shift+0

¹ Select to brace selects a block bounded by braces. Before using this option, the cursor must be immediately next to the beginning or ending brace of the block.

Maintaining separate search results

In addition to the usual search capabilities, the Find feature can display the results of four different searches separately.

  1. Click the Find icon Find Results Icon or press Ctrl+F to perform searches in the currently open file, or in all open files.

    Lua Editor Find dialog

  2. Before starting a search, choose Find 1, Find 2, Find 3, or Find 4 to choose the window in which you want to see the results. You can maintain the results of four searches separately in the tabbed windows. The search results in the other windows remain unchanged.

    Find Results

  3. To go directly to the line in the code which a search result was found, double-click the line in the search results.

    Tip:
    For convenience, you can also dock or float the Find Results window.

Perforce integration

Lua Editor includes Perforce integration features. When you open a file from your Perforce environment, Lua Editor displays the file’s status in the top right of the text editing window.

Not Checked Out

Checked Out By You

The Source Control menu offers Check Out/Check In functionality.

Source Control Menu