modules/gdscript/tests/scripts/runtime/features/onready_base_before_subclass.gd
raw| 1 | #GH-63329 |
| 2 | class A extends Node: |
| 3 | @onready var a := get_value("a") |
| 4 | |
| 5 | func get_value(var_name: String) -> String: |
| 6 | print(var_name) |
| 7 | return var_name |
| 8 | |
| 9 | class B extends A: |
| 10 | @onready var b := get_value("b") |
| 11 | |
| 12 | func _ready(): |
| 13 | pass |
| 14 | |
| 15 | func test(): |
| 16 | var node := B.new() |
| 17 | node._ready() |
| 18 | node.free() |