Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tutorials/best_practices/godot_interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@ accesses:

func my_method():
if fn:
fn.call_func()
fn.call()

# parent.gd
extends Node

@onready var child = $Child

func _ready():
child.fn = funcref(self, "print_me")
child.fn = print_me
child.my_method()

func print_me():
Expand Down
4 changes: 2 additions & 2 deletions tutorials/best_practices/scene_organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ initialize it:
.. code-tab:: gdscript GDScript

# Parent
$Child.func_property = funcref(object_with_method, "method_on_the_object")
$Child.func_property = object_with_method.method_on_the_object

# Child
func_property.call_func() # Call parent-defined method (can come from anywhere).
func_property.call() # Call parent-defined method (can come from anywhere).

.. code-tab:: csharp

Expand Down