Skip to main content

Code Generation

Learn how to automatically generate game logic and scripts using OasisW's AI code generation feature.

1. Creating a Script and Feature Overview

  1. Create a script asset from the Asset View.

Code

  1. Double-click the created script asset to open it in the code editor.

Code

1. Code Assistant

You can open and close the AI prompt window.

2. Settings

Change the editor theme.

Code

3. History

Check and manage the history of code generated by AI.

Code

  • Restore: Revert to the state before applying changes. Code

  • Delete: Delete a history entry. Code

4. Add File

Add script files you want to reference.

Code

5. Add Entity

Add entities to reference.

Code

2. Generating Code

  1. Enter the command you want to implement into the prompt window and click the Send button.
    • Example: "Implement movement with WASD keys"

Image

  1. Click Apply Current Code.

Image

  1. Use the Undo All/Keep All buttons to update the code.

Image

  • Undo All: Revert back to your original code (before the generated code).
  • Keep All: Save to history and apply the newly generated code.
info

Additional Files

  • Create: Newly generated script that creates a script in the asset view root when clicked
  • Apply: Modified reference script that updates the reference script when clicked
ImageImage