0 votes

Can I change the values of

onready var canvas = $ "CanvasLayer/Control"


export var size = Vector2() setget set_size

func set_size(value):
    size = value


func engine_run():

    if Engine.editor_hint:

    canvas.rect_size = size

Can I update this in real time?

in Engine by (335 points)
edited by

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.

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

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.