Inputs of UFUNCTION to DECLARE_FUNCTION

Hello,

i want to set the reference (UPARAM (ref) Fcsv file)) of the UFUNCTION in an function (IterateThroughStructProperty) inside of the DECLARE_FUNCTION.
See the following code:

UFUNCTION(BlueprintCallable, Category = "CSV", CustomThunk, meta = (CustomStructureParam = "AnyStruct"))
		static void ReceiveSomeStruct(UProperty* AnyStruct, UPARAM(ref) Fcsv &file);

		DECLARE_FUNCTION(execReceiveSomeStruct)
		{
			// Steps into the stack, walking to the next property in it
			Stack.Step(Stack.Object, NULL);

			// Grab the last property found when we walked the stack
			// This does not contains the property value, only its type information
			UStructProperty* StructProperty = ExactCast<UStructProperty>(Stack.MostRecentProperty);

			// Grab the base address where the struct actually stores its data
			// This is where the property value is truly stored
			void* StructPtr = Stack.MostRecentPropertyAddress;

			// We need this to wrap up the stack
			P_FINISH;
			

			// Iterate through the struct
			IterateThroughStructProperty(StructProperty, StructPtr,file);
		}

How can i achieve that?

1 Like