All Questions

Community

K
Kajetan Kuszczyński

How to do it in C#?

What is C# equivalent of `class_name , ""`?
  • Thanks for your help!

  • N
    Daniel Nimmervoll

    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.

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