Can't show enum input variable as combo box in multi return c++ function

Hi,
as written in the title, I’m creating a function which uses an enum variable in order to manage the different logic flows.

At first I defined a c++ function that returns an array of a custom struct and the resulting node was something like this.
I find the combo box for the enum quite useful for me instead of declaring a variable to store the value ad assign it as input in the node.

UFUNCTION(BlueprintCallable)
		static TArray<FST_ImportData> FOLDGeometryParser(FString projectPath, FString simulationName, FString caseName, ImportMode mode);

image

Now I tried to modify the function making it void type so I can have multiple output
But now the node doesn’t show the combo box anymore.

UFUNCTION(BlueprintCallable)
		static void FGeometryParser(const FString& projectPath, const FString& simulationName, const FString& caseName, const ImportMode& mode, TArray<FST_ImportData>& modelData, TArray<FVector>& trees);

image

Is there a way to show that variable as combo box back again?

Original text:
Я не знаю ответа, но могу предположить что разница в методе передачи значения.

В первом примере Вы передаете по значению, а во втором по ссылке.

Google translate:
I do not know the answer, but I can assume that the difference is in the method of passing the value.

In the first example, you pass by value, and in the second, you pass by reference.

2 Likes

Thanks for the answer. I agree with you
I believe it is due to the fact I pass the variable by reference.

I tried to remove the “&” after the type and I got an error and couldn’t compile.
I solved by removing both the “&” and “const” qualifiers from that variable. I wasn’t sure it could work out like this.

I’m not expert in programming but I thinks it depends on the fact that since I passes the variable as reference, you need to have something to reference to. the combo box within the node doesn’t refer to any memory address so you can’t use that.

UFUNCTION(BlueprintCallable)
		static void FGeometryParser(const FString& projectPath, const FString& simulationName, const FString& caseName, ImportMode mode, TArray<FST_ImportData>& modelData, TArray<FVector>& trees);
1 Like