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]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
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.
I have the same problem. But i manage to solve it. In my case i forgot to add in override BeginPlay function Super::BeginPlay in one of inherited class.
Not sure if it is entirely related, but make sure that you are not trying to spawn an actor before the world has “officially” called begun play.
I know that spawning actors before this can cause issues with networking.