Using GDscript global_variables.gd in a C# Script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zakaria Guenna

I have a game for android which i was creating using only GDscript .
When i heard that Godot 3.2 Mono supporting Android Export , i moved the project to Godot 3.2 Mono actually rc2 .

In my game i have defined a Gdscript global_variables.gd as a Singleton that contain shared variables across all my game .

MY QUESTION IS : is there is a way or How can i use and get data from this file in a C# script file class ?

:bust_in_silhouette: Reply From: Zakaria Guenna
public class Globals : Node
{
    private Node Globals;
    
    public override void _Ready()
    {
        Globals = GetNode("/root/global_variables");
        GD.Print(Globals.Get("player_score"));
    }

}

this is a example of how to get player_score stored in global_variables.gd

there are other methods to get functions and set variables values like Globals.Call("function_name",properties); and Globals.Set("variable_name", value);