diff --git a/docs/functions-variables.md b/docs/functions-variables.md index 12b515b..47193e0 100644 --- a/docs/functions-variables.md +++ b/docs/functions-variables.md @@ -8,7 +8,7 @@ ``` // returns a list of all the variables defined in the map. -getAllVariables(): Promise> +getVariables(): Promise> ``` Variables are returned as a Map. The key is the name of the variable, the value is an object representing the variable. @@ -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')); ```