- Edited
Let's say i have following setup:
// State.cs
public class State: Node {}
// Walk.cs
public class Walk : State {}
// StateMachine.cs
public override void _Ready()
{
var node = new State();
node.Name = "WalkState";
AddChild(node);
node.SetScript(ResourceLoader.Load("res://Scenes/Actors/Player/Walk.cs"));
}
class methods ready, process, _physics_process isn't beign executed. why? but if i call class name itself, everything works.
var node = new Walk();
AddChild(node);
is here any way to instanciate class by name? lets say i have array with string names: {"walk", "stand", "jump"}