Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

NetworkTransform Performance Issue in Large Scenes

Offen
#2,447 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
20/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
csharp, unity

Rechercherichtung

Beginne damit, das Problem in einem Unity-2021.3.12f1-Projekt mit etwa 500 NetworkTransform-Komponenten zu reproduzieren, und untersuche den Profiler in einem Build. Vergleiche die Kosten der Transform-Synchronisierung mit einer synchronisierten Matrix4x4-Netzwerkvariablen und ermittle anschließend, ob der Aktualisierungspfad von NetworkTransform gebündelt oder in das Job System verschoben werden kann; als abgeschlossen gilt die Aufgabe, wenn der Overhead im eingeschwungenen Zustand deutlich geringer ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

stat:imported Tracking type:optimization
Description

The Network Transform component is significantly more expensive than necessary. I suspect this is due to its lack of batching or usage of the Job System. It might be possible to move most, if not all, the logic into a burst compiled job.

Reproduce Steps
  1. Build a new project with netcode
  2. Add ~500 network transforms
  3. Observe profiler in build

image

Expected Outcome

Executing the syncing of the transforms should incur a time cost on par with simply using a synced network variable of a matrix4x4

Actual Outcome

Considerable performance losses, possibly due to Update overhead

Details

Unity Version 2021.3.12f1
Netcode Version 1.2.0
Transport Version 1.3.0

Additional Thoughts

Im working on a fairly large simulation project, and am using NGO for sharing said data. As such, I have between 500 and 1000 network transforms for syncing simulation data between clients. The profiling data above is after the simulation settles, so the only network messages been sent are heartbeat.

After doing my own deep dive into the network transform, I noticed that the work it was doing wasn't batched. It might be possible to use the job system to deal with these transforms, thus allowing a much larger cap on the amount of synced network objects in a scene.

Sadly, until the performance of the network transform is improved, I'm going to have to attempt to implement my own version of the network transform.

Vorherrschende Sprache
C#
Sterne
2.3k
Forks
464
Ø Merge
2 T. 18 Std.
Gemergte PRs (30 T.)
15

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

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

Alle Issues in Unity-Technologies/com.unity.netcode.gameobjects

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.