Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects

Preload Network Prefab Addressables

Aperta
#2,818 8 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Ufabsther ci sta già lavorando.

Dal 25/4/2024.

priority:medium stat:Investigating type:bug
Lingua principale
C#
Stelle
2.3k
Fork
461
Merge medio
3g 16h
PR unite (30g)
20

Descrizione

Description

I am trying to Preload Network prefabs from addressables without spawning, the sequence of the process is that I run the server, invoke preload, then run the client.

The issue is that the client connection is denied immediately. It only happens if the server invokes a preload for more than 17 prefabs, then:

  • The client tries to connect after server's invoked preloading.
  • The client disconnects then reconnect.

It works only in two cases:

  1. If the loaded prefabs count is 17 or less, then the client late joining or reconnecting is not an issue.
  2. If the loaded prefabs count is more than 17, then it works only if the client is connected when the server invokes preloading Rpc.
Reproduce Steps

Iam testing on the (Dynamic prefab sample) project.
https://docs-multiplayer.unity3d.com/netcode/current/learn/bitesize/bitesize-dynamicPrefabs/

  1. Open scene (05_API Playground Showcasing All Post-Connection Use-Cases).
  2. Create and Add some prefabs to the addressables .
  3. Add the prefabs to the Dynamic Prefabs References List in AppController class (The list items should be more than 17).
  4. Build addressables.
  5. Run As a Host.
  6. Click (Load All Prefabs Async)
  7. Now Run the client.
Actual Outcome

The client connection is denied, the disconnects.

Expected Outcome

The client connects and preload all prefabs that the server has loaded.

Environment
  • OS: Windows 11
  • Unity Version: 2022.3.12F1 LTS
  • Netcode Version: 1.6.0

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.