コード例 #1
0
        public void CallMe()
        {
            CheckDestroyed();
            if (!CallMe_IsValid)
            {
                NativeReflection.LogInvalidFunctionAccessed("/Script/USharp.BPTest1:CallMe");
                return;
            }
            if (CallMe_InstanceFunctionAddress == IntPtr.Zero)
            {
                CallMe_InstanceFunctionAddress = NativeReflection.GetFunctionFromInstance(Address, "CallMe");
            }
            unsafe
            {
                byte * ParamsBufferAllocation = stackalloc byte[CallMe_ParamsSize];
                IntPtr ParamsBuffer           = new IntPtr(ParamsBufferAllocation);

                NativeReflection.InvokeFunction(Address, CallMe_InstanceFunctionAddress, ParamsBuffer, CallMe_ParamsSize);
                NativeReflection.InvokeFunction_DestroyAll(CallMe_InstanceFunctionAddress, ParamsBuffer);
            }
        }