object InternalFunctionHandler(string functionName, object[] args) { // Convert arguments into Interop Variable structs InkVarInterop[] cArgs = new InkVarInterop[args.Length]; for (int i = 0; i < args.Length; i++) { cArgs[i] = new InkVarInterop(args[i]); } // Call the callback InkVarInterop var = ExternalFunctionCallback(_instanceId, functionName, (uint)cArgs.Length, cArgs); return(var.BoxedValue); }
object FunctionImplInternal(string functionName, object[] args) { // Convert arguments into Interop Variable structs InkVarInterop[] cArgs = new InkVarInterop[args.Length]; for (int i = 0; i < args.Length; i++) { cArgs[i] = new InkVarInterop(args[i]); } // Call the callback InkVarInterop var = ExternalFunctionCallback(_instanceId, functionName, (uint)cArgs.Length, cArgs); // Box the return value and send it back to the ink runtime return(var.BoxedValue); }
public static extern void ObserverCallback(int instanceId, [MarshalAs(UnmanagedType.LPStr)] string variableName, InkVarInterop newValue);