This is common practice to all of this kind of functions. If you have no return function on something that should return something and one of arguments is a reference (&
), you need to declare local variable (but it can be declared anywher actullye) of that reference type and pass it to reference like this:
TArray<AActor*> Result;
GetOverlappingActors(Result,AClassYouLookingFor::StaticClass());
Result array will be filled with actors that overlaps