October 2016
Intermediate to advanced
452 pages
9h 47m
English
For this recipe, you'll need to have an Actor subclass ready to instantiate. You can use a built-in class such as StaticMeshActor, but it would help to practice with the custom Actor you made in the previous recipe.
GameMode as your base class, giving it a name such as UE4CookbookGameMode.GameMode class:virtual void BeginPlay() override;
BeginPlay in the .cpp file:void AUE4CookbookGameMode::BeginPlay() { Super::BeginPlay(); GEngine->AddOnScreenDebugMessage(-1, -1, FColor::Red, TEXT("Actor Spawning")); FTransform SpawnLocation; GetWorld()->SpawnActor<AMyFirstActor>( AMyFirstActor::StaticClass(), ...Read now
Unlock full access