worldRef property

T get worldRef

Reference to the World instance that this component belongs to.

Implementation

T get worldRef => _world ??= _findWorldAndCheck();
  1. @visibleForTesting
set worldRef (T? value)

Allows you to set the world instance explicitly. This may be useful in tests.

Implementation

@visibleForTesting
set worldRef(T? value) => _world = value;