currentCamera property

CameraComponent? get currentCamera

A camera that currently performs rendering.

This variable is set to this when we begin rendering the world through this particular camera, and reset back to null at the end. This variable is not set when rendering components that are attached to the viewport.

Implementation

static CameraComponent? get currentCamera {
  return currentCameras.isEmpty ? null : currentCameras[0];
}