Navigation
API > API/Runtime > API/Runtime/Engine
PlayerControllerIterators This is the safest, most efficient way to iterate over player controllers.
Examples:
for (TPlayerControllerIterator
// This PC will always be locally controlled! check(PC->IsLocalController(); }
for (TPlayerControllerIterator
// This can only be done on the server! // Only the server has player controllers for everyone! check(GetWorld()->GetNetMode() != NM_Client); }
| Name | TBasePlayerControllerIterator |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/UnrealEngine.h |
| Include Path | #include "UnrealEngine.h" |
Syntax
template<class T, bool LocalOnly>
class TBasePlayerControllerIterator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TBasePlayerControllerIterator
(
UWorld* InWorld |
UnrealEngine.h |
Functions
Public
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdvanceCurrent() |
UnrealEngine.h | ||
void Next() |
UnrealEngine.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
UnrealEngine.h | ||
T * operator*() |
UnrealEngine.h | ||
void operator++() |
UnrealEngine.h | ||
T * operator->() |
UnrealEngine.h |