Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/functions-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

```
// returns a list of all the variables defined in the map.
getAllVariables(): Promise<Map<string, VariableDescriptor>>
getVariables(): Promise<Map<string, VariableDescriptor>>
```

Variables are returned as a Map. The key is the name of the variable, the value is an object representing the variable.
Expand All @@ -17,9 +17,9 @@ You can fetch individual properties defined in Tiled for this variable using thi
For instance:

```typescript
import { getAllVariables, VariableDescriptor } from '@workadventure/scripting-api-extra';
import { getVariables, VariableDescriptor } from '@workadventure/scripting-api-extra';

const variables = await getAllVariables();
const variables = await getVariables();
console.log(variables['my_variable'].properties.getOne('persist'));
```

Expand Down