Skip to content

NetworkTransform sends always all informations. Improve network perfomance with flags and buffer. #2022

@itismarcii

Description

@itismarcii

Is your feature request related to a problem? Please describe.
The NetworkTransform syncs its Position/Scale/Rotation every time and with all information. Which really costs a lot of resources if you got several objects that need to be synced over the whole network. For example:

If you never changed your position you still need as much resources as some did that re scaled, moved and rotated.

Describe the solution you'd like
The solution is simple. Buffer the information of the last tick in NetworkTransform and check if a change occurred. If so use a bitmask to determine what has changed and send a flag with a float array from server back to client which unwraps the information.

Like that you only send the smallest amount of information.
Best case: none.
Second best case: One and flag.
Worst case: All information with flag.

Since we can make the flag a byte. The extra amount of traffic is nearly insignificant.

Additional context
We used this method for our Test environment and it improved the traffic a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions