Skip to content

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.

License

Unity-Technologies/com.unity.netcode.gameobjects

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

…ing client synchronization [MTT-7539] (#2735)

* fix

This resolves the issue where any NetworkObjects created during client synchronization when scene management is enabled. client synchronization mode is set to LoadSceneMode.Single, and the active scene (where the NetworkObjects are created) is unloaded during synchronization.

* fix

This fixes the exception that can occur when there are many (100's) NetworkObjects spawned and the application instance is exited (or you exit play mode in the editor).

* style

removing auto-added namespace

* test

Updating WhenManyObjectsAreSpawnedAtOnce_AllAreReceived test as it was not using the right logic to validate all NetworkObjects had been spawned.

Adding WhenManyObjectsAreSpawnedDuringSynchronization_AllAreReceived to validate this PR.

* update

adding changelog entry

* test

Migrating WhenManyObjectsAreSpawnedDuringSynchronization_AllAreReceived  to SpawnNetworkObjectsDuringSynchronizationTest.SpawnNetworkObjectsDuringSynchronization.

* fix

Scenes loaded in single mode, after a client is connected, will defer CreateObjectMessage driven spawning until the scene loading event is completed. Consolidated the logic into a single method.

Added two new SceneEventProgress enums to be returned when a client attempts to load or unload a scene using NetworkSceneManager or any instance type tries to use the NetworkSceneManager when scene management is disabled (as opposed to throwing an exception it just logs a warning and returns the relative SceneEventProgress value).

* test

Made modifications due to SceneEventProgress adjustments.
Renamed SpawnNetworkObjectsDuringSynchronizationTest to SpawnNetworkObjectsDuringSceneEventsTest and migrated it to the test project tests runtime NetworkSceneManager  folder.
Added an additional

* update

Updated the change log entry.

* style

removing unused namespace.

* Update CHANGELOG.md

* Update CHANGELOG.md

Fixing bad changelog merge

* Update SceneEventProgress.cs

Fixing the issue with the enum changes breaking the InternalNetcodeError value

* Update SceneEventProgress.cs

* update

Made adjustments based on PR review suggestions.
Added additional changelog entries to better reflect the PR.
0f959eb

Git stats

Files

Permalink
Failed to load latest commit information.

Netcode for GameObjects

Forums Discord Manual API

GitHub Release

Welcome!

Welcome to the Netcode for GameObjects repository.

Netcode for GameObjects is a Unity package that provides networking capabilities to GameObject & MonoBehaviour workflows. The framework is interoperable with many low-level transports, including the official Unity Transport Package.

Getting Started

Visit the Multiplayer Docs Site for package & API documentation, as well as information about several samples which leverage the Netcode for GameObjects package.

You can also jump right into our Hello World guide for a taste of how to use the framework for basic networked tasks.

Community and Feedback

For general questions, networking advice or discussions about Netcode for GameObjects, please join our Discord Community or create a post in the Unity Multiplayer Forum.

Compatibility

Netcode for GameObjects targets the following Unity versions:

  • Unity 2021.3(LTS), and 2022.3(LTS)

On the following runtime platforms:

  • Windows, MacOS, and Linux
  • iOS and Android
  • Most closed platforms, such as consoles. Contact us for more information about specific closed platforms.

Development

This repository is broken into multiple components, each one implemented as a Unity Package.

    .
    ├── com.unity.netcode.gameobjects           # The core netcode SDK unity package (source + tests)
    └── testproject                             # A Unity project with various test implementations & scenes which exercise the features in the above packages.

Contributing

We are an open-source project and we encourage and welcome contributions. If you wish to contribute, please be sure to review our contribution guidelines.

Issues and missing features

If you have an issue, bug or feature request, please follow the information in our contribution guidelines to submit an issue.

You can also check out our public roadmap to get an idea for what we might be working on next!

About

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages