AGameModeBase::K2_FindPlayerStart
#include "GameFramework/GameModeBase.h"
Access: public
Specifiers: UFUNCTIONBlueprintPure
Description
Blueprint-accessible wrapper for FindPlayerStart. Exposes player start selection to Blueprint graphs as a pure function. Prefer FindPlayerStart when overriding in C++.
Caveats & Gotchas
- • This is a non-virtual Blueprint wrapper — overriding FindPlayerStart in C++ is the correct way to customize spawn selection; K2_FindPlayerStart just delegates to it.
- • Marked BlueprintPure, so it has no execution pin in Blueprint graphs. If the search has side effects (e.g., claiming a spawn), those will fire unexpectedly if the node is evaluated multiple times in the same frame.
- • The display name in Blueprint is 'FindPlayerStart', identical to the C++ virtual — do not confuse the two when reading Blueprint graphs.
Signature
ENGINE_API AActor* K2_FindPlayerStart(AController* Player, const FString& IncomingName = TEXT("")); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Player | AController* | The controller for the player who needs a spawn location. | — |
| IncomingName | const FString& | Optional tag name of a specific PlayerStart actor to use. | TEXT("") |
Return Type
AActor* Example
Use from Blueprint to preview spawn location text
// In a Blueprint GameMode event graph:
// Event BeginPlay
// -> K2_FindPlayerStart (Player = GetPlayerController(0), IncomingName = '')
// -> GetActorLocation -> Print String (shows where first player would spawn) Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?