Exemple #1
0
        /// <summary>
        /// Binds a key event to a delegate function.
        /// Returned reference is only guaranteed to be valid until another input key is bound.
        /// </summary>
        public FInputKeyBindingHandle BindKey(FKey key, EInputEventType keyEvent, FInputActionHandler handler)
        {
            IntPtr  functionAddress;
            UObject obj;

            if (NativeReflection.LookupTable.GetFunctionAddress(handler, out functionAddress, out obj))
            {
                return((FInputKeyBindingHandle)Native_UInputComponent.BindKey(
                           Address, ref key, (byte)keyEvent, obj.Address, functionAddress));
            }
            return(default(FInputKeyBindingHandle));
        }