onAssetChanged method

  1. @override
void onAssetChanged(
  1. String path
)
override

A file changed: a picture a shape is drawn with is read again by the game's renderer. (The editor has materials read again itself.)

Implementation

@override
void onAssetChanged(String path) {
  final service = _scope?.engine?.services.maybe<Graphics3D>();
  if (service == null || !service.isStarted) return;
  service.sceneRenderer.shapes.reloadTexture(path);
}