Contract for screen size and aspect ratio calculation.
The SceneManager delegates all screen size measurements to an IScreenSizeCalculator instance.
Remarks
The calculated screen size is game specific and can return any value fit for a particular game design.
Two implementations are provided out of the box: the default DefaultScreenSizeCalculator and NoResizeScreenSizeCalculator.
The DefaultScreenSizeCalculator calculates a viewport that horizontally fits on screen and preserves the given aspect rastio
while the NoResizeScreenSizeCalculator always returns the full screen size disregarding any aspect ratio constraints.
The IScreenSizeCalculator is used in resize events in the following manner:
Contract for screen size and aspect ratio calculation. The
SceneManagerdelegates all screen size measurements to anIScreenSizeCalculatorinstance.Remarks
The calculated screen size is game specific and can return any value fit for a particular game design. Two implementations are provided out of the box: the default DefaultScreenSizeCalculator and NoResizeScreenSizeCalculator. The DefaultScreenSizeCalculator calculates a viewport that horizontally fits on screen and preserves the given aspect rastio while the NoResizeScreenSizeCalculator always returns the full screen size disregarding any aspect ratio constraints.
The IScreenSizeCalculator is used in resize events in the following manner: