Reading global variables in JavaScript

01 August 2016 13:22 #10886
Hello everybody,

I don't know how to read global variables from JavaScript.
I have created a node in logic editor (see attached image) with a global variable name called "pizza" and "margherita" as string value.

Is there any API to access global variables (for both reading and writing)?

02 August 2016 18:01 #10924
Hello, Fabio!

For now the only way to interact with the logic editor from JavaScript is to use JSCalback logic node. It allows to read and write variable values.
You can take a look at this tread with JSCallback discussion:
Blend4Web Team - developer
Please register or log in to leave a reply.