Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Mystical-TEDDY_ |
Guys, I don’t know why but for the “remote” and “local” tabs aren’t showing up at all. I have an auto load script set up on Node2D, but I can’t get anything to work while trying to reference a global variable.
public class GameManager : Node2D // [ Global Variable ]
{
public int currentDir = 1;
}
public class Player : KinematicBody2D // [ Player Node ]
{
var gameManager = GetNode(“/root/GameManager”);
gameManager.currentDir = 1;
}
There’s more code for the player but it’s not relevant
I also get this error message for trying to use the global variable -
Invalid token ‘=’ in class, record, struct, or interface member declaration