0 votes

Godot 3.1

For some strange reason my dictionary from singleton that I need to modify gets COWed in script. I've checked documentation and it clearly states that dictionaries are shared (http://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#built-in-types).
I've tried accessing dictionary with onready var key = global.data['key'] as well as onready var key = get_node("/root/global").data['key']but when code hits the key = 'variable' my dictionary simply gets copied.

tl;dr Do I have to use setter/getter to modify dictionary in a singleton or am I missing something?

in Engine by (14 points)

Same issue here :c

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.