Skip to main content

Manage Variables

In this example, we will show you how to use the CreativeEditor SDK's Creative Engine to modify variables through the variable API. The variable API lets you set or get the contents of variables that exist in your scene. To learn more about variables, have a look at their documentation.

Explore a full code sample of the integration on CodeSandbox or view the code on GitHub.


This example uses the headless Creative Engine. See the Setup article for a detailed guide. To get started right away, you can also access the variable API within a running CE.SDK instance via cesdk.engine.variable. Check out the APIs Overview to see that illustrated in more detail.


  • findAll(): string[] returns the names of all existing variables.
  • setString(name: string, value: string): void lets you set the value of a variable to the given string.
  • getString(name: string): string returns the string value of a variable.
  • remove(name: string): void removes a variable.
import '';
const config = {
baseURL: ''
CreativeEngine.init(config).then(async (engine) => {
const variableNames = engine.variable.findAll();
engine.variable.setString('name', 'Chris');
const name = engine.variable.getString('name');