Start a script from a node
Posted: Sun Feb 03, 2019 8:19 am
The doc is not so easy for a beginner. What I like to do is to start a method in one of my own c# script when the player has selected one of two nodes. How do I do that?
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=2004
Code: Select all
using PixelCrushers.DialogueSystem;
...
void Awake() {
// Make your C# method available to the Dialogue System:
Lua.RegisterFunction("WriteLog", this, SymbolExtensions.GetMethodInfo(() => WriteLog(string.Empty)));
}
void WriteLog(string message) { // This is your C# method.
Debug.Log(message);
}