// calling this instead of InstantiatePrefabAsync in ProtobufSerializer.DeserializeObjectsAsync private static IEnumerator _InstantiatePrefabAsync(ProtobufSerializer.GameObjectData gameObjectData, IOut <UniqueIdentifier> result) { if (GetModPrefabAsync(gameObjectData.ClassId) is IPrefabRequest request) { yield return(request); if (request.TryGetPrefab(out GameObject prefab)) { result.Set(UnityEngine.Object.Instantiate(prefab).GetComponent <UniqueIdentifier>()); yield break; } } yield return(ProtobufSerializer.InstantiatePrefabAsync(gameObjectData, result)); }