OasisWManual 한국어
Section 4. AI GAME BUILDER How-to Pending 2

Undo AI work

There are two ways to undo AI work. Undo (Ctrl+Z, or Cmd+Z on Mac) reverts changes the AI made to the scene, but doesn't revert script files. Restore on a checkpoint reverts both the scene and script files to that point. That's why our first recommendation is to create a checkpoint before you give the AI a task. If you didn't create one, use Undo to revert the scene and fix scripts by hand. This page explains how.

What Undo reverts and what it doesn't

Observed in a test on 2026-10-29 (undoing 2 AI prompts in a row):

TargetUndo result
A change the AI made to the scene (renaming an entity)Reverted with 1 Undo. Before undoing, the action name in the bottom bar was Rename Entity
The entire previous AI task (creating 3 groups, moving 6 entities, adding a box)Reverted all at once with 1 Undo. Before undoing, the action name was AI Turn
A script file the AI edited (default in spin.js, 90 → 45)Still 45 after 2 Undos. Not reverted

One Undo may not line up exactly with one AI task. In testing, a single AI task was recorded as separate steps, such as Rename Entity and AI Turn. Before undoing, check the action name at the right of the bottom bar, and check HIERARCHY after each press. If you undo too far, use Redo (Ctrl+Shift+Z).

Before you start

  • You have to find what changed before you can revert it. How to find changed entities, assets, and scripts is in Check what the AI changed.
  • Know what belongs to each scene and what the project shares. Script files are shared by the project, so reverting one also affects other scenes that use the same file. Details are in What's per scene and what the project shares.

Before you give the AI a task

Until a reliable way to revert is confirmed, preparing in advance is the safest approach.

What to doWhy
Create a checkpoint from main → VERSION CONTROL in the top barIf you don't like the result, you can go back to that point with History → Restore. In testing, a script file the AI edited (default 45) also went back to 90 with Restore (2026-10-29, 1 run). How to do this is in Save and restore your work with checkpoints
Write down values you tuned by hand (speed, number of lives, positions)In one case, the AI changed a value for testing and left it that way (starting lives: 1)
Use fewer AI tasks on a game that's nearly finishedIn one case, a prompt to add a rule deleted the surrounding walls and changed the look of the whole scene
Practice and experiment in a different sceneEntities belong to each scene, so entities in other scenes stay as they are. Shared scripts, however, can change along with it

Do it in the editor

Revert the AI's changes by hand, by type. First, list what changed using the steps in Check what the AI changed.

If a value changed

  1. Select the entity in HIERARCHY. The ENTITY panel opens on the right.
  2. Enter the original value you wrote down and press Tab. Position, rotation, and scale go in the Position, Rotation, and Scale fields; script attributes go in that script's fields under SCRIPT.
  3. For values a script reads only once when the game starts, we saw cases where the game tab had to be refreshed twice for the change to take effect (2 of 2 runs). Details are in Change script attribute values.

If you didn't write down the original values, you can't use this method. In that case, consider Rebuild in a new scene below.

If a material changed

  1. In the entity's RENDER → Materials, click the pencil icon in the material field.
  2. Click the original material in ASSETS.

To detach an attached script

If a script the AI attached to an entity is making the game misbehave, try detaching it.

  1. In the entity's SCRIPT component, turn off the ON switch on that script's row. The switch changes to OFF (red), and the script no longer runs in the game.
  2. Run the game with Launch and see if it's better.
  3. If it is, click ··· → Remove Script on that row. The row disappears.

Remove Script only detaches the script from the entity. The script file stays in ASSETS. Don't confuse it with Remove Component under ··· in the SCRIPT header, which removes the whole component, not a single script row.

If entities were added or deleted

If the AI created entities you didn't ask for (surrounding walls, decorations), select them in HIERARCHY and delete them. Pending Verify the steps for deleting an entity with the Delete key and the menu in the current editor Before deleting, check whether a script uses the entity. If its name is in an entity field of a script attribute (e.g. ball), that script uses it. It may be used even if it isn't in a field. In one tested run, gameUI.js counted entities whose names started with Star, without any field.

We haven't found a way to restore entities the AI deleted. For now, you have to create the same entities again. In testing, the AI deleted the 4 surrounding walls while adding the lives rule (2 of 2 runs).

If a script file changed

Script files aren't reverted by Undo. Use these methods.

  • If you have a checkpoint from before the AI task, Restore to it. Script files also go back to their contents at that point. Note that any other changes you made to the scene after that point are reverted too.
  • Find changed files by comparing checkpoints: the checkpoint details list changed assets, such as spin.js MODIFIED. This tells you which scripts changed.
  • Click the script file and read its current contents in the CODE field on the right. If the change is short, fix it directly in the code editor. How to use the code editor is in Code editor.
  • Don't immediately delete files with odd names (*Probe.js, etc.). In 4 of 7 runs, the AI repurposed a test file for another feature, so the game may be using it.

Rebuild in a new scene

If a lot changed or you don't know the original values, it may be faster to create a new scene in the same project and rebuild from scratch. Building the first game again took 6 to 10 minutes. The steps are in When the AI stalls, stops short, or loops.

A new scene also shares the project's scripts. If the AI edits a shared script in the new scene, the game in the previous scene may change too.

Let the AI do it

You can name what to revert and ask the AI to revert it. However, we haven't yet sent this kind of prompt in the current editor. Since there's no prompt with confirmed results, we don't include one on this page. Pending Test a "Delete what you just added and go back to the previous state"-style prompt 3 times

Things to know when you let the AI do it:

  • A revert prompt is also an AI prompt, so unrequested changes may happen along with it. Changes observed with other prompts are in Check what the AI changed.
  • There's no guarantee the AI remembers the original values exactly. If you know the original values, enter them by hand instead of asking.
  • Revert prompts also use credits. Details are in Credits.

Check the result

  • After reverting, refresh the game tab or run it again with ▶ Launch, and play from start to finish.
  • If you detached or edited scripts, also run the other scenes in the same project.

Troubleshooting

SymptomCauseSolution
Undo reverted the scene, but the game behaves the sameScript files the AI edited aren't reverted by UndoRestore to a checkpoint from before the AI task, or fix the script by hand
After Undo, entities aren't drawn in the viewportAppears to be an editor display issue (1 run)Refresh the editor tab
The AI's changes remain after pressing Ctrl+ZObserved once on 2026-10-26. On 2026-10-29, the changes were revertedCheck the action name in the bottom bar and press Undo once more, or Restore to a checkpoint
Pressing Ctrl+Z reverted a value you set by handCtrl+Z undoes manual editsRedo with Ctrl+Shift+Z (per the Controls list)
Clicking ✕ in the material field removed the color✕ clears the fieldRevert with Ctrl+Z, or pick the original material again with the pencil icon
You didn't write down the original valuesThere's nothing to revert toConsider rebuilding in a new scene

Next steps

Source ai/undo-ai-work.html