Forum

Reading global variables in JavaScript

01 August 2016 13:22
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)?

Thanks,
Fabio
http://www.os3.it
02 August 2016 18:01
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:
https://www.blend4web.com/en/forums/topic/1988/
Blend4Web Team - developer
Twitter
LinkedIn
 
Please register or log in to leave a reply.