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

Allow configuring NetworkTransform through a ScriptableObject

Aperta
#3,870 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Tracking type:feature-2.x
Lingua principale
C#
Stelle
2.3k
Fork
461
Merge medio
3g 16h
PR unite (30g)
20

Descrizione

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.

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.

Direzione di ricerca

Inizia ispezionando il componente NetworkTransform e le sue proprietà serializzate dell’inspector, in particolare gli assi di sincronizzazione, le soglie, l’interpolazione, la sincronizzazione dei quaternioni, la compressione e la precisione half-float. Determina come potrebbe essere assegnata una configurazione ScriptableObject senza interrompere i workflow esistenti, quindi verifica che le configurazioni possano essere create come asset e applicate a più NetworkTransforms.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, unity
Ambito
game-dev, networking
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.