overrideSharedDeviceOpener function

Registration overrideSharedDeviceOpener(
  1. BackendOpener open
)

Opens the device each game's Model3dComponents share with open rather than flutter3d_app's openDevice, until the returned Registration is cancelled, which puts back the opener there was before. open is a BackendOpener, handed the DeviceRequest every other opener is.

Implementation

Registration overrideSharedDeviceOpener(BackendOpener open) {
  final before = sharedDeviceOpener;
  sharedDeviceOpener = open;
  return Registration(() => sharedDeviceOpener = before);
}