Hey
Could anyone explain how to spawn ACharacter actor in c++?
World->SpawnActor(AActor::StaticClass(), nullptr, Parameters) works
World->SpawnActor(APawn::StaticClass(), nullptr, Parameters) works
World->SpawnActor(ACharacter::StaticClass(), nullptr, Parameters) is null
I looked in doc, read forums (here are at least three questions and no one was solved) and I couldn’t find anything. Seems like no one spawns character in c++.
I have custom Character class let it be ASomeCustomCharacter. Creating BP from it and spawning directly on level in editor works fine. Spawning same BP from PlayerController BP also works fine, but not in c++.
I saw one assumption that workable way to set Character BP as property and pass it as TSubclassOf<ASomeCustomCharacter> World->SpawnActor(BlueprintClassesProvider->SomeCustomCharacterClass, nullptr, Parameters)