Download

Exception. ActorHasBegunPlay

When I abulding and playing the editor from VS2019 and try to play the game an exception is thrown. nothing is exactly clear with what I’m doing wrong but the message in th out is this:

[2021.02.11-20.37.38:768][157]LogOutputDevice: Error: Ensure condition failed: ActorHasBegunPlay == EActorBeginPlayState::HasNotBegunPlay [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/Actor.cpp] [Line: 3377]

BeginPlay was called on actor /Game/Maps/UEDPIE_0_Co-GameMainLvl.Co-GameMainLvl:PersistentLevel.BP_Launcher_C_0 which was in state 1

https://preview.redd.it/03hxj3q4o4h61.png?width=1541

I thought maybe is because on my Slauncher.cpp I did not have the Super::BeginPlay(); function but I’ve placed it and it still doesn’t work. the blueprint that inherits from it is empty but I do call on it in my playerpawn blueprint

Without the callstack it’s a little hard to tell. Based on the state of your actor it would appear as though something is causing BeginPlay to be triggered twice for the same object. Your implementation of ASLauncher seems correct (as far as the BeginPlay function is concerned).

You should be able to place a breakpoint in ASLauncher::BeginPlay and see it be hit twice for the same this pointer. One of those hits is probably wrong.