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

Allow configuring NetworkTransform through a ScriptableObject

Offen
#3,870 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Tracking type:feature-2.x
Vorherrschende Sprache
C#
Sterne
2.3k
Forks
461
Ø Merge
3 T. 16 Std.
Gemergte PRs (30 T.)
20

Beschreibung

Whenever I create a new thing requiring the synchronization of a transform, I add a NetworkTransform component to it, and have to configure the properties of it again and again to the same exact values I have found to work for my use cases. This becomes increasingly bothersome as the complexity of the project increases. And if you then want to modify something later you have to go through everything manually and change the properties. (Yes I know, prefab variants, but those are only viable in very specific situations)

I would propose moving most of the properties on the NetworkTransform to a ScriptableObject saved to the assets folder, so you could configure those options in a more cohorent way. You could create different configs for fast moving objects, big slow objects, etc. and assign them to different NetworkTransforms easily.

The properties I often myself copy pasting which would be good candidates to live on ScriptableObjects are:

  • Axis to synchronize
  • Thresholds
  • Interpolation settings (these are the most painful to reconfigure every time)
  • Quaternion sync, compression, half float precision

This could be an additional feature accessible through the NetworkTransform through a boolean toggle in the inspector, to not break existing workflows.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der Untersuchung der NetworkTransform-Komponente und ihrer serialisierten Inspector-Eigenschaften, insbesondere der Synchronisationsachsen, Schwellenwerte, Interpolation, Quaternion-Synchronisierung, Kompression und Half-Float-Präzision. Ermittle, wie eine ScriptableObject-Konfiguration zugewiesen werden könnte, ohne bestehende Workflows zu beeinträchtigen, und überprüfe anschließend, dass Konfigurationen als Assets erstellt und auf mehrere NetworkTransforms angewendet werden können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, unity
Bereich
game-dev, networking
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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