This function can be used to retrieve the unique camera ID value of the default camera (the camera that GameMaker Studio 2 uses when no camera views or ports are active in a game room).
Camera index (real).
var def = camera_get_default();
view_camera = def;
The above code gets the camera ID for the default camera and sets the view camera for port to use it.