Skip to content

Can not override setters / getters #40288

@mrimvo

Description

@mrimvo

Godot version:
3.2.2 stable

OS/device including version:
Linux

Issue description:
I tried to override Label's set_text(value) to add custom logic.

Expected: method to be called when trying to set the text.
Observed: method is not called.

Steps to reproduce:

Run a scene with this Script attached to a Label:

extends Label

func _ready():
	text = "abc"
	
# This setter method is never called
func set_text(value):
	.set_text(value)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions