This page provides a detailed example of how this method is used in the TWC codebase.
public static Player[] gpAllPlayers(this IGamePlay GP)
var players = GamePlay.gpAllPlayers();
foreach (var player in players) {
Console.WriteLine($"Player: {player.Name}");
}
This method retrieves all human players currently in the game.
Works well, but may include spectators. Filtering active players is recommended.