- Edited
I've been trying to figure this out for more than a day.
The variable I am trying to access is public in the other file.
Here is the scene file. I am trying to access the script from Sprite_SpawnPoint to the script attached to Atom_Count
Here is the code
_public class Atom_Count : Label
{
Sprite_SpawnPoint totalAtoms;
public override void _Ready()
{
totalAtoms = GetTree().GetRoot().GetNode<Sprite_SpawnPoint>("Spawner/Sprite_SpawnPoint");
}
public override void _Process(float delta)
{
Text = String.Format("{0:0000}", totalAtoms.totalAtomsInShell);
}
}_
Here are the errors shown
Thanks in advance!!! =)