onGameResize method

  1. @override
  2. @mustCallSuper
void onGameResize(
  1. Vector2 gameSize
)

It receives the new game size. Executed right after the component is attached to a game and right before onLoad is called.

Implementation

@override
@mustCallSuper
void onGameResize(Vector2 gameSize) {
  super.onGameResize(gameSize);
  children.forEach((child) => child.onGameResize(gameSize));
}