Godot: Exported variables don't update in real-time

Created on 31 Mar 2020  路  4Comments  路  Source: godotengine/godot

Godot version:
3.2 mono
OS/device including version:
ubuntu 19.10
Issue description:
If you export variady read the bles using tool, and change their value, it is only updated when you click another node and the click back to the changed node.

Steps to reproduce:

  • Create 2 nodes: A and B
  • At B attach a script (can not be built-in)
  • code this:
extends Node

export var a:int = 0
export var update:bool = false

func process(delta):
   if update:
        a = int(rand_range(0,100))
        update = false
  • Save scene close it and open again to take effects
  • Value is changed, you cant see
  • Click Node A
  • Click Back to Node B
  • Should see the change

Minimal reproduction project:
N/A

enhancement editor

Most helpful comment

you need to call property_list_changed_notify() after changing the values to update the inspector.

All 4 comments

you need to call property_list_changed_notify() after changing the values to update the inspector.

This is currently intended behavior as pointed out by @mrcdk. Last time I heard, reduz has plans to move from an observer system to polling, which should eliminate the need to call property_list_changed_notify() after modifying a property's value.

Related: #41697

A similar issue in #43238, but in this case property_list_changed_notify() doesn't work. And there seems to be no way to force update the inspector either.

Was this page helpful?
0 / 5 - 0 ratings