Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 627 Bytes

CSharp.md

File metadata and controls

24 lines (16 loc) · 627 Bytes

C# wrapper

If you are using C# for your project then there is a small convenience wrapper around the Dialogue Manager.

First, add the namespace:

using DialogueManagerRuntime;

Then you can load a dialogue resource and show the example balloon:

var dialogue = GD.Load<Resource>("res://example.dialogue");
DialogueManager.ShowExampleDialogueBalloon(dialogue, "start");

Or manually traverse dialogue:

var line = await DialogueManager.GetNextDialogueLine(dialogue, "start");

The returned line is a DialogueLine and will have mostly the same properties to the the GDScript version.