0 votes

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?

asked Jun 18, 2019 in Engine by usurun (322 points)
edited Jun 18, 2019 by usurun

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.