GetOverlappingActor() - Unreal Documentation

Can someone explain to me why the GetOverlappingActors() function shown in the attachment indicates a void return type and yet the description says the function returns a set of actors…? I’ve been going over the various classes in Unreal and noted similar situations.

I’m sure I’m missing something…maybe another coffee?

Thanks everyone!

First of all, I am learning also, so my answer can be wrong.

The functions in Unreal can’t return multiple values so, from what I have seen, there are functions where you pass a variable (or more) and the function modify that variable with the result. That function (GetOverlappingActor) asks for Actor components and it will return (in that components) the actors overlapping.

Hope it helps.

Thanks for the quick response Munsa! Yes, I’m learning Unreal C++ too but also how to read the Unreal documentation. I see what you’re saying about OverLappingActor() taking reference parameters. Still, I wouldn’t describe any changes to references in the function as a return value; the function is showing a void return. But, maybe you’re right in how Unreal documentation describes these sorts of changes.

Yes, you helped me and thanks.

1 Like

That’s exactly what it means, that the first parameter is the “return” value.

Thanks Dan! Now I better understand the documentation and what’s being implied. Will help me a lot as I go through it.

Privacy & Terms