Skip to content

Binding External Conditional Function #846

Discussion options

You must be logged in to vote

Joh answered me in another place, but this was exactly what the external functions were meant for, I just misunderstood the syntax.

	public void ConfigureConversation(TextAsset _conversation)
	{
		m_Story = new Story(_conversation.text);
		m_Story.BindExternalFunction("save_key", (string x) => { return Blah(x); }, true);
	}

	private static int Blah(string _key)
	{
		return 5;
	}

I think I wanted to put the Blah directly in as an argument to BindExternalFunction, but either it's not possible or I was just doing it wrong.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by moo-artichoke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant