How to update a value of another Node with tool mode.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By usurun

Can I change the values of

onready var canvas = $ "CanvasLayer/Control"

So

export var size = Vector2() setget set_size

func set_size(value):
	size = value
	update()

And

func engine_run():
	
	if Engine.editor_hint:
		return
	
	canvas.rect_size = size

Can I update this in real time?

I struggle to understand what you want to ask. You can access other nodes properties from tool scripts. If you want to access a script variable/export of another node then that nodes script should also be a tool script.

wombatstampede | 2019-06-18 10:30

It looks like it works if it’s inside the _draw function.

usurun | 2019-06-18 16:35