Unity-Technologies / Unity-Technologies/CharacterControllerSamples

Netcode tutorial doesn't handle multiple MainEntityCamera from different clients but uses HasSingleton<MainEntityCamera>

Open
#6 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
408
Forks
67
PR merge metrics
No merged PRs in 30d

Description

If you follow the directions in https://github.com/Unity-Technologies/CharacterControllerSamples/blob/master/_Documentation/Tutorial/tutorial-netcodecharacters.md

Everything works in the editor fine, that is until a second client connects. That's when that world creates a 2nd MainEntityCamera entity and the MainCameraSystem breaks.

Considering it's a tutorial for netcode it should be assumed it's for multiplayer and multiple clients.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with _Documentation/Tutorial/tutorial-netcodecharacters.md and follow the tutorial through MainCameraSystem, focusing on its HasSingleton assumption. Reproduce the issue by connecting a second client and inspect the resulting MainEntityCamera entities. Done means the tutorial's netcode setup no longer breaks when multiple clients create cameras.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
documentation, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.