Drag function parameters to graph like variables?

… so, to access parameters we don’t have to connect to function input node.

Thanks!

Hello PowerDesign,

If you wish to have this functionality, it would be easiest to create a local variable (function specific) that you can get/set yourself anywhere in the code and hook it up to the output/input nodes. Seeing as the input/output parts of the function don’t actually store the values in variables, this wouldn’t be possible unless we changed them to create variables which would end up using more memory any time a function is called.

Have a nice day.

Thanks, ! I knew that approach.

In other programming languages (e.g. C++), function arguments automatically becomes local variables, you can even change the value, that is why there’s a const modifier.

I also believe, if a parameter has Pass-by-Reference unchecked, the function call already uses that memory. If Pass-by-Reference is checked, the memory footprint is the reference. Anyway, this 1 share of the memory footprint (be it value or reference) can’t be avoided.

It seems to me that your approach (manually create and set a local variable) uses twice as much memory: the automatic local argument variable and the manually created local variable.

The inputs and outputs are stored each as a UPROPERTY but both of these are set prior to the function call. With the current setup, while it would take the same amount of memory, adding this functionality would cause slowdowns.

Creating your own local variables is only a suggestion and yes it is less performant, but it would be best way to get the functionality you’re looking for.

It’s very hard to imagine “adding this functionality would cause slowdowns”.

You can connect input parameters to Reroute nodes, then use the Reroute nodes as convenient connection points.

Think of the should-be-implemented “input parameter stand-ins” (not creating new local variables) as those reroute nodes, just there’s no connecting lines between input parameters and input parameter stand-ins but there’re names.

This could be just a edit-time feature, after compilation, you replace input parameter stand-ins with connecting lines.

I’ve placed a feature request in under the number UE-25924. I’ll be sure to let you know of any updates that are made to the request when the occur.