Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported variables don't update in real-time #37464

Open
nonunknown opened this issue Mar 31, 2020 · 5 comments
Open

Exported variables don't update in real-time #37464

nonunknown opened this issue Mar 31, 2020 · 5 comments

Comments

@nonunknown
Copy link
Contributor

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:
tool
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

@mrcdk
Copy link
Contributor

mrcdk commented Mar 31, 2020

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

@Calinou
Copy link
Member

Calinou commented Apr 5, 2020

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.

@Calinou Calinou added this to the 4.0 milestone Apr 5, 2020
@Calinou Calinou changed the title Exported variables doesnt update at real-time Exported variables don't update in real-time Apr 17, 2020
@EricEzaM
Copy link
Contributor

EricEzaM commented Sep 6, 2020

Related: #41697

@Xrayez
Copy link
Contributor

Xrayez commented Oct 31, 2020

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.

@Calinou
Copy link
Member

Calinou commented Mar 3, 2021

This should be resolved in the master branch since the inspector is now updated via polling.

We still need to document the need to call property_list_changed_notify() in tool scripts that modify exported variables (but only for 3.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants