C++ Functions As C# Properties
/** Returns the game instance object */
UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
static ENGINE_API class UGameInstance* GetGameInstance(const UObject* WorldContextObject);UFUNCTION(BlueprintCallable)
void SetTestValue(int32 Value);
UFUNCTION(BlueprintCallable)
int32 GetTestValue();public int TestValue
{
get
{
unsafe
{
byte* ParamsBufferAllocation = stackalloc byte[GetTestValue_ParamsSize];
nint ParamsBuffer = (nint) ParamsBufferAllocation;
UStructExporter.CallInitializeStruct(GetTestValue_NativeFunction, ParamsBuffer);
UObjectExporter.CallInvokeNativeFunction(NativeObject, GetTestValue_NativeFunction, ParamsBuffer);
int returnValue;
returnValue = BlittableMarshaller<int>.FromNative(IntPtr.Add(ParamsBuffer, GetTestValue_ReturnValue_Offset), 0);
return returnValue;
}
}
set
{
unsafe
{
byte* ParamsBufferAllocation = stackalloc byte[SetTestValue_ParamsSize];
nint ParamsBuffer = (nint) ParamsBufferAllocation;
UStructExporter.CallInitializeStruct(SetTestValue_NativeFunction, ParamsBuffer);
BlittableMarshaller<int>.ToNative(IntPtr.Add(ParamsBuffer, SetTestValue_Value_Offset), 0, value);
UObjectExporter.CallInvokeNativeFunction(NativeObject, SetTestValue_NativeFunction, ParamsBuffer);
}
}
}Last updated