I am writing a code similar video code example (I'm trying to use GetOwner () -> GetName ()). Swears that "Using a pointer to the type of an incomplete class is not allowed." I absolutely agree with that, I just didn’t expect that UE4 will change everything in this way. I see that it is necessary to connect this - https://api.unrealengine.com/INT/API/Runtime/Engine/GameFramework/AActor/GetOwner/index.html . I connect, after that BeginPlay () starts to swear. Writes the UObject class does not contain a BeginPlay member. I ask you to tell at least where to dig, what is the error. Ideally, please show the correct code to use GetOwner ().

Closed due to the fact that off-topic participants VTT , isnullxbh , freim , 0xdb , RiotBr3aker 23 Apr at 12:23 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - VTT, isnullxbh, freim, 0xdb, RiotBr3aker
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Link to the video in the studio. And where is BeginPlay() ? - HolyBlackCat 6:42 pm
  • I can not provide the video, because video lessons are paid, and their publication = copyright infringement. When I add to the inclination what I described above, the 19th line is highlighted - Dmitry Sorvachev

1 answer 1

Thank you all for your attention. Found the answer needed to be included in .cpp, not in .h

  • And how were we supposed to guess? From the screenshot of this is not visible at all, and the more you have not posted anything. - ߊߚߤߘ
  • 2
    Sorry, I will continue to lay out everything that relates to the issue. - Dmitry Sorvachev