💾

Importing/Starting a New Project

The code base was originally built in Unity 2019.3.6, so the screenshots will be from that version of the unity editor but mostly this process looks the same up to 2022.1.20f at the time of this writing. Jusssst to be safe though, I’ve made packages for each year 2019→2022.

IF you are trying to use a newer version because the years have passed on, I’ve found it less problematic to import Cyborg Netcode in one of its original Unity Versions, then upgrade the project to the newer version of Unity rather then importing on a newer version of unity.

New Unity Project

Create a new 2D Unity project with version 2019.3.6 or 2020.3.15 or 2021.3.12 or 2022.3.8. Once its loaded up, go to edit→project settings:

Then pick the Player section and enable Allow ‘unsafe’ code:

Save and close this window.

Next pick Assets→Import Package→ Custom Package:

Import Time

And navigate to find where you downloaded [your_unity_version]/CyborgNetcodePackageV1.unityPackage(e.g Unity2019.3.16/CyborgNetcodePackageV1.unityPackage) or one of the other sample project unityPackages.

It will spend a bit of time decompressing the package, then show you a window to select the assets you wish to import. For your first time, just import everything:

Give it time. Once its done, it should be ready for testing. IF its complaining about Unsafe code, do the first step again and save and it should recompile and be good.

Test to see if it worked

Quickest way to test to see if its working is to open the Join scene and run the project from there. Choose Host Game:

And then enable ‘can server be a player too’ and then choose Host Private Game:

Then just play around a bit and check to see if there are any issues in the console. This wont check the networking, but it will let you know pretty quick if any files did not import properly.

To thoroughly test the project, follow the Testing Guide