Why is the variable lost?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Tort
var Globals = ProjectSettings
Globals.set('test', null)
print(Globals.get('test'))

WARNING: not found: test

:bust_in_silhouette: Reply From: literalcitrus

Globals got removed in 3.0, so set() and get() default to the Object implementation in ProjectSettings, which means that it looks for an existing property. Try using set_setting() and get_setting() instead.

Reference

set_setting() and get_setting()

The result is the same

Tort | 2018-02-15 22:10

You may have to manually add the property to the Project Settings for it to work.

literalcitrus | 2018-02-15 22:46