Skip to content

Data and media files

To use files in your actions, first add them to your game.

In the Level Editor, open the FILES tab in the Toolbar.

Click the Upload button to add files. You can also upload files directly into a folder. Open the folder’s context menu and click Upload here.

Screenshot of the FILES tab in the TOOLBAR with Upload highlighted

To use a file in an action, you can drag it from the FILES toolbar into the corresponding form field in the action.

Screenshot showing a file being dragged into an action

The file path will be inserted into the field, and the file can then be used by the action. You can also manually enter the file path or use a variable.

Use Select File to instead choose the file from a dropdown list of all available files.

Selecting a file

The base for the relative file path is the files folder of the respective game.

You can also use an absolute path that points to a file in the file system on which the adaptor:ex server is running.

Some actions can also load files via hyperlinks, i.e., using a URL from the internet. Such file references must start with http or https. For example: https://docs.adaptorex.org/assets/header.png

Simply copy the URL into the corresponding form field of the action.

Publishing Files

If you have secured your adaptor:ex setup with authentication, files can only be accessed via the adaptor:ex Editor or the local file system.

To make files accessible via a separate link without authentication, open the context menu of a file or folder and click Publish. The file can then be opened or downloaded via your server’s URL or IP without authentication.

You can copy or open the public link via the context menu.

If you make a folder public, all files and folders within it will also be publicly accessible.

Note

If your server is accessible via a public IP or URL, use the host option in the adaptor:ex server config so that Copy public URL points to the correct base address or IP.

File Location

You can also manage and add files and folders in the local file system using your file explorer.

If you installed adaptor:ex with the default settings, a new folder named adaptorex was created in the directory where you run the application. The files of your game can then be found in the file system under adaptorex/games/<game name>/files.

For example, to add an audio file called "ambient_starlight.wav" to your game "Playground", place it in the corresponding files folder.

adaptorex
├── games
|   ├── Playground
│   |   ├── files
│   |   |   └── ambient_starlight.wav
│   |   ├── functions
|   |   └── public
├── log
├── nedb
└── config.json

In the server configuration readme, you can find out how to change the file directory.