loadSceneSubtree function Assets and loading

Future<void> loadSceneSubtree(
  1. Node node, {
  2. String? package,
  3. AssetBundle? bundle,
  4. FsceneComponentRegistry? registry,
})

Streams a lazy placeholder node's prefab content under it, resolving the referenced prefab by its source path (the registry-aware counterpart of loadSubtree for scenes loaded with loadScene).

The streamed content hot-reloads: editing any of the prefab's assets re-streams the subtree in place while it is loaded.

Implementation

Future<void> loadSceneSubtree(
  Node node, {
  String? package,
  AssetBundle? bundle,
  FsceneComponentRegistry? registry,
}) async {
  final sceneRegistry = await SceneRegistry.load(bundle: bundle);
  return sceneRegistry.loadSubtree(
    node,
    package: package,
    bundle: bundle,
    registry: registry,
  );
}