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

Preload Network Prefab Addressables

Aberta
#2,818 8 comentários 0 reações 1 responsável Ver no GitHub

@Ufabsther já está trabalhando nisso.

Desde 25/4/2024.

priority:medium stat:Investigating type:bug
Linguagem predominante
C#
Estrelas
2.3k
Forks
461
Merge médio
3d 16h
PRs com merge (30d)
20

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.