Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.14 Gdscript Integration #71

Merged
merged 7 commits into from
Nov 2, 2024
Merged

v0.2.14 Gdscript Integration #71

merged 7 commits into from
Nov 2, 2024

Conversation

dogboydog
Copy link
Collaborator

@dogboydog dogboydog commented Nov 2, 2024

[0.2.14] 2024-11-02

  • GDScript: Add GDScriptViewAdapter, a C# Script which allows you to write custom dialogue views in GDScript. See GDScriptViewAdapter.cs for more details.
  • GDScript: Add new method AddCommandHandlerCallable to DialogueRunner, allowing commands to be registered from GDScript. GDScript command handlers that use asynchronous await functionality are also supported as blocking YarnSpinner commands, similar to using async Task commands in C#.
  • Samples: A new sample has been added called GDScriptIntegration, which demonstrates making a simple custom view in GDScript, and using cross-language scripting to access methods on C# components such as the DialogueRunner and InMemoryVariableStorage
  • Add new method to InMemoryVariableStorage: public Variant GetVariantValue(string variableName). An example of a method that allows you to retrieve YarnSpinner story variables from GDScript.
  • Thanks to @dbaz for taking my old code from the gdscript_integration branch and making sure it compiles with the current version of the plugin

This fixes #31 in the scope defined in that issue. There are some features of the plugin such as implementing a custom variable storage that currently still require writing C# code. However, a similar approach to the GDScriptViewAdapter could be followed in that case.

@dogboydog dogboydog merged commit b2ecac8 into develop Nov 2, 2024
6 checks passed
@dogboydog dogboydog deleted the gdscript_commands branch November 2, 2024 15:11
@dbaz
Copy link
Contributor

dbaz commented Nov 3, 2024

thanks again @dogboydog !

dbaz added a commit to dbaz/YarnSpinner-Godot that referenced this pull request Nov 22, 2024
b2ecac8 v0.2.14 Gdscript Integration  (YarnSpinnerTool#71)

git-subtree-dir: YarnSpinner
git-subtree-split: b2ecac8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration with GDScript
2 participants