All Questions


Kajetan Kuszczyński

How to do it in C#?

What is C# equivalent of `class_name , ""`?
  • Nathan Lovato replied

    Hi, I don't know, I don't use C# at all with Godot.

  • N
    Daniel Nimmervoll replied

    There is no equivalent yet. Maybe in Godot 4.0 (it is at least in the milestone :). You can workaround that by adding a simple Node and then rename it for example to "StateMachine" and then add the C# Script.

    If you are using this with States, do the same and add the "States" script. if you want to extend from this, it is just simple inheritance. Attach a new script like "PlayerState.cs" and then inherit from States.

    public class PlayerState : State

    Hope this helps.

  • Nathan Lovato replied

    Thanks for your help!