GetOverlappingActors() is undefined / lesson 101 of Unreal Engine 5

Hello,
i am %100 sure that i’ve followed every single step according to the course but for some reason when i use GetOverlappingActors() it just doesn’t work like it does in the video. In the course this is not even the main topic of the lesson, the instructor just writes to code and goes on.
what I’ve tried:

#include “Components/PrimitiveComponent.h”

Write it as “UPrimitiveComponent::GetOverlappingActors(Actors);”
when i do it like this it can autocomplete the function so it can clearly see it but now the error is changed to “this declaration has no storage class or type specifier”

Rebuild

Regenerate Visual Studio project files

None of it worked and i couldn’t find anyone else that faced the same problem. I am a complete beginner and so please explain in basic terms. I’ve been trying to solve this for more than 2 days and i am so close to throwing my laptop out of the window.

That looks incorrect. Please show your full code.

WOW! Thank you for the super early reply!
What is the best way to show the full code? i can send it in another way if a screenshot is not viable(sorry it’s my first time using this website)

Is that also failing to compile? Can you show the output of compilation.

Yes it’s failing to compile.

and when i debug anyway this is the error

At least one issue seems like its this:

it gives the same error when i use DebugGame as well unfortunately

1 Like

Please use the build task using the Development Editor configuration.

If you are talking about this it fails by giving the exact same error. If you are mentioning something else by the build task i didn’t quite understand it.

CryptRaiderEditor

Please show the full output even if it’s the same.

Yes of course

And could you show the header fine please?

here it is

And that would be why, you created a class using USceneComponent as the parent class instead of UBoxComponent.

1 Like

Ah Yes! That was my mistake. I think i initially created as UBoxComponent but when i was copying stuff from Grabber i changed that too for some reason.
Thank you so much for all your effort and sorry for making you go through all my code :smiley:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms