Reply To: Scope of dynamic variables

Forums 💬 NodeCanvas 🗨️ General Discussion Scope of dynamic variables Reply To: Scope of dynamic variables

#15050
Gavalakis
Keymaster

    Hey,

    The scope of the dynamic variables is just like all other variables. They are accesible from all nodes/tasks like any other blackboard variable is. The real difference is that they are created at runtime instead of pre-created.
    You can have as many as you want, but if you are setting a new dynamic variable and a variable with the same name and type already exist it will overwrite the old one. If not, a new one will be created.

    If you are checking a dynamic variable and one exists with same name and type you will get it’s value, if one doesn’t exist you will get the default value of the type of that variable.

    Hope this helps 🙂