DialogueNodes
DialogueNodes copied to clipboard
C# Support
There's C# support for this plugin? I'm trying to call C# variables, do I need to write the whole conversion call (to call C# variables in GDScript) in the Condition Node to make it work like it's in godot documentation?
There's any C# example that I can follow?
I'm sorry I haven't tested the plugin with C# and I don't have any experience working with C# as well.
For what it's worth I've made a very scrappy integration that parses the .tres resources - making them easier to work with in C#. But I've not got as far as variables yet.
Code example ^ Sorry, bad separation of concerns here - mixed in with my game specific code, but the parsing bit might be a useful headstart.
If I get the time to finish and cover all the node types I'll clean it up and share it properly!
I've made a C# version of this plugin in a way that the editor plugin (still in GDScript) writes to C# objects instead of .gd files and then I use a port of dialogue_box.gd and some other objects like the custom RichTextEffects.. that way, in-game, I don't do any cross language communication.. I tried that at the beginning but I was getting weird editor-related bugs... I can post a fork if you are interested, but I need to fix some glitches on the Demo scene first.
With this, you could do what you want by just adding your variable to the variables dictionary before executing the dialogue
@germanbv posting a fork would be great
There's C# support for this plugin? I'm trying to call C# variables, do I need to write the whole conversion call (to call C# variables in GDScript) in the Condition Node to make it work like it's in godot documentation?
There's any C# example that I can follow?
You can find the port here: https://github.com/germanbv/DialogueNodesForCSharp I've added external variables support in a way that the dialogue manager reads the public fields of an external class I still need to update the README file to explain how it works