File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -177,18 +177,15 @@ instantiation:
177177 # "one" is an "initialized value". These DO NOT trigger the setter.
178178 # If someone set the value as "two" from the Inspector, this would be an
179179 # "exported value". These DO trigger the setter.
180- export(String) var test = "one" setget set_test
180+ @export var test: String = "one":
181+ set(value):
182+ test = value
183+ print("Setting: ", test)
181184
182185 func _init():
183186 # "three" is an "init assignment value".
184- # These DO NOT trigger the setter, but...
187+ # Trigger the setter
185188 test = "three"
186- # These DO trigger the setter. Note the `self ` prefix.
187- self.test = "three"
188-
189- func set_test(value):
190- test = value
191- print("Setting: ", test)
192189
193190 .. code-tab :: csharp
194191
You can’t perform that action at this time.
0 commit comments