inkle / ink-unity-integration

Unity integration for the open source ink narrative scripting language.
http://www.inklestudios.com/ink
Other
578 stars 101 forks source link

Are regular Ink functions (not external) available via the Unity Integration? #171

Closed Bard09 closed 2 years ago

Bard09 commented 2 years ago

Is it possible to reference regular (not external) functions in Unity/C#? The "Running Your Ink" documentation doesn't mention anything about regular Ink functions, and in my testing, function names don't appear accessible via variablesState.

If no--

  1. Is this planned?
  2. What is the best practice solution for this need currently? Populate it in Ink into a standard variable? Move the calculation to an External Function?
joningold commented 2 years ago

story.EvaluationFunction("ink_function_name", parameters as required)

Message ID: @.***>

Bard09 commented 2 years ago

I'm so relieved that it's already implemented! Thank you @joningold. Was there a documentation resource on this I missed?

tomkail commented 2 years ago

Looks like it's not in the docs! I'll add that now. I've been wanting to add proper demos to this repo for the longest time to cover all the core functionality.