GetOwner() -> Can't access members

Guys I’m new to Unreal Engine.
Today I’ve started Udemy’s C++ course.
I’ve added custom C++ component to SM_Chair.
The script is simple, It’s just reporting the position of a mesh through the log.
when i type “GetOwner()->” there’re no suggestions …
I can’t access the members of " GetOwner()-> " :frowning:
Can’t find any solution please help.

Just a guess here, maybe try including TestCPP.h from your project.

Encountering the same problem. just tried transferring from 4.15 to 4.16.

Using GetOwner() in 4.15 is fine but in 4.16 it doesnt work when i tried using the (->) operator even the (.) operator to it.

For additional information(hope it helps):

I also took a screenshot of the difference between 4.15(left) and 4.16(right) definitions of GetOwner().

Ignore the errors and Compile. Its Intellisense nonsense (you can basicly close down the Error log its unreliable)

If it Compiles everything is fine :stuck_out_tongue_winking_eye: if it does not let me know what the Output Log says.

Oh and like DevDevy said include YourProject.cpp (TestCPP.h in your case at the very top)

So the problem was Intelisense.
It compiles fine, but there’re no suggestions during typing.
I’ve installed “Visual Assist X” and now everything’s working perfect.

Also make sure you have set an owner, or else GetOwner will be null