GetSpectatorPawn() always returning null


This function (GetSpectatorPawn) inside PlayerController.h is always returning nullptr even when my player is in the spectating state (on client and server).

I’ve tested the function on the client and server and they both return null even though I’m in the spectating state and controlling a spectator.

Anyone know how to properly use this function in a multiplayer game?


Did you find a solution to this?