Closed quisar closed 10 months ago
Interesting. I was thinking it would be more like how the in-game editor works to just put any return values as parameters and modify them in the function body. But that's pretty weird for js developers.
That would probably work, but would be extremely weird when reading the code. And as you already made the decision to use out parameter for predefined functions, I think going with this is good enough. There is of course a performance cost as this mostly imply a copy of each output parameter, but I am wondering if we can solve this later on with code optimizations.
This allows js function to declare return values either as a single Value, or as an array of Value. This will generate new output parameters to the behavior that will be set when return is called.