TWO PLAYER TOP DOWN - STOP PLAYERS RUNNING OFF SCREEN

Is it possible to attach the NavMesh to the camera and make it the same size as the field of view, so that the players cannot move out of it?