Up to date

This page is up to date for Godot 4.0. If you still find outdated information, please open an issue.

Cross-language scriptingΒΆ

Godot allows you to mix and match scripting languages to suit your needs. This means a single project can define nodes in both C# and GDScript. This page will go through the possible interactions between two nodes written in different languages.

The following two scripts will be used as references throughout this page.

extends Node

var my_field: String = "foo"

func print_node_name(node: Node) -> void:

func print_array(arr: Array) -> void:
    for element in arr:

func print_n_times(msg: String, n: int) -> void:
    for i in range(n):