Exemple #1
0
        /// <summary>
        /// Binds a delegate function an Axis defined in the project settings.
        /// Returned reference is only guaranteed to be valid until another axis is bound.
        /// </summary>
        public FInputAxisBindingHandle BindAxis(string axisName, FInputAxisHandler handler)
        {
            IntPtr  functionAddress;
            UObject obj;

            if (NativeReflection.LookupTable.GetFunctionAddress(handler, out functionAddress, out obj))
            {
                FName axisFName = (FName)axisName;
                return((FInputAxisBindingHandle)Native_UInputComponent.BindAxis(
                           Address, ref axisFName, obj.Address, functionAddress));
            }
            return(default(FInputAxisBindingHandle));
        }