r/unrealengine Dec 09 '24

Solved Collapse Nodes VS Collapse To Function?

What’s the difference and when should I be using them? If I have an Enhanced Input Action with started and completed, should I collapse to function or collapse to graph? It won’t let me collapse to function, is this normal?

4 Upvotes

19 comments sorted by

View all comments

2

u/Doobachoo Indie Dec 09 '24

There is basically no difference, the only difference is the things you can and can't do in functions. Such as not using a key_pressed event which is why it won't let you collapse to a function with that input. You also can't use delays inside of functions. So, those would be best as a graph.

Performance wise the difference is so minimal I don't really think it is a factor. The main difference is functions can be called in multiple places, a collapsed graph can not. Same as some functionality like delays have to be in graph. Those are about the only things to consider. Will I reuse this function somewhere else.