• Register a callback that fires when a remote syncInstantiate object is created on this client. Use this to get references to objects spawned by other users.

    Parameters

    • callback: SyncInstantiateCallback

      Called with the instantiated Object3D, the network model data, and the Needle Engine context in which the instantiate event was received

    Returns () => void

    An unsubscribe function

    const unsub = onSyncInstantiate((instance, model, context) => {
    console.log("Remote object created:", instance.name, model.originalGuid, context);
    });
    // later: unsub();