idaot wrote: ↑19 Jan 2023 15:24
Yes, each command has their own C# script with the operation executed under ExecuteAsync, in the case of processInput it's ProcessInput.cs. You can also instantiate any command in C#, an example can be found in the Integration Options guide (https://naninovel.com/guide/integration ... hing-modes) however we recommend doing to former in most cases for performance reasons.
Thank you for your response.
I was confused when I was building a function that worked '@processInput ' based on 'processInput.cs'
I am entering the following code.
Code: Select all
using UnityEngine;
using Naninovel;
public class ItemClickAndInputoff : MonoBehaviour
{
public void itemClickAndInputoff(bool InputEnabled, string Name)
{
var inputManager = Engine.GetService<IInputManager>();
inputManager.ProcessInput = InputEnabled;
var sampler = inputManager.GetSampler(Name);
sampler.Enabled = kv.NamedValue;
}
}
This code is not working yet, and it is being viewed and written at processInput.cs.
Run inputManager.ProcessInput with boolInputEnabled.
In the string name, I will write the name of the sampler I want.
What I'm curious about is what 'kv.NamedValue' does.
I tried to interpret the role of kv.NamedValue in the processInput.cs code, but it didn't work out.
Can you give me a direction?