> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worlds.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Unreal Engine Plugin

> Worldsbase was built with gaming as it’s first priority. Our Worldsbase Unreal Engine Plugin allows full access to everything in Worldsbase. Still, everything is accessible via a REST API if you don’t wish to use the plugin.

## Installation

1. Download the open source plugin [here](https://github.com/WorldsOrg/worldsbase-ue-plugin)
2. Place `wgs` folder into `Plugins` directory <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/wgs-directory.png" width="700" />

## Web3 Integration

Coming Soon

## Example 1: Add Data to Table

In this example, we will add data to a table using the `Insert Data` node. Skip to the end of this section to see the full blueprint example.

1. Right click and search for wgs subsystem node <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/subsystem.png" width="500" />
2. Drag from subsystem node and search for desired WGS function. In this example, we will use the Insert Data function. <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/insert-data.png" width="500" />
3. Fill in the table name <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/table-name.png" width="200" />
4. Drag from Data Rows and select the `Make Array` node <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/make-array.png" width="400" />
5. Add a pin to the Make Array node for each column you want to edit in your table
6. Drag from each pin and select `Make DataRow` <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/make-data-row.png" width="400" />
7. Fill out column name and value for each data row <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/fill-data-rows.png" width="400" />
8. Drag from Insert Data node execution pin and search for `Bind Event to On Http Request Completed`. This will execute once our backend call is complete. <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/http-complete-bind.png" width="600" />
9. Make the subsystem the target for the Bind Event node <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/http-complete-bind-target.png" width="400" />
10. Drag from the event pin on the bind event node and create a custom event <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/custom-event.png" width="400" />
11. Finally, do something with the result. Here we just print to console. For Insert Data, the result will be a confirmation string. <img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/print-result.png" width="400" />

### Complete blueprint

<img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/example-insert-data.png" width="900" />

## Example 2: Read Data from Table

To read data from a table, the setup is similar to example 1, except you don't have to insert any data into the `Get Table` node. Just enter the table name. Here is what the blueprint will look like:

<img src="https://mintlify.s3-us-west-1.amazonaws.com/worlds-4/images/unreal/get-table.png" width="700" />
