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

Allow configuring NetworkTransform through a ScriptableObject

Open
#3,870 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Tracking type:feature-2.x
Dominant language
C#
Stars
2.3k
Forks
461
Avg merge
3d 16h
Merged PRs (30d)
20

Description

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.

Contributor guide

Open the contributing guide

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 by inspecting the NetworkTransform component and its serialized inspector properties, especially synchronization axes, thresholds, interpolation, quaternion sync, compression, and half-float precision. Determine how a ScriptableObject configuration could be assigned without breaking existing workflows, then verify that configurations can be created as assets and applied to multiple NetworkTransforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.