how to use Nani command in C# script
Hi,
I would like to use @showUI myUI in a C# script, is there any reference on how to use Nani command in C# script? could not find it
Thanks!
Hi,
I would like to use @showUI myUI in a C# script, is there any reference on how to use Nani command in C# script? could not find it
Thanks!
There is nothing special here: create instance of the command and invoke ExecuteAsync
method on it.
It's mentioned in the integration guide: https://naninovel.com/guide/integration ... hing-modes
Here are the sources: https://github.com/Naninovel/Integratio ... cs#L14-L15
That said, I'd recommend against using commands like this; instead access Naninovel APIs directly. Eg, instead of creating an instance of show UI command and invoking execute method on it, inspect the command implementation and invoke the required APIs directly. For example, to show a UI get IUIManager
service, use GetUI
method to get reference to the desired UI and invoke Show
method on it. Here is the guide on engine services: https://naninovel.com/guide/engine-services