- Mandatory pre-requisites
- New Unity project
- Absolutely must add this to your packages:
com.unity.nuget.newtonsoft-json
- Otherwise, calling .ToString() on JSON objects will return
NewsonSoft.Something.Something
, and your API calls will return HTTP 400s for bad requests
- Otherwise, calling .ToString() on JSON objects will return
- Must have Linux dedicated server modules installed (including the Mono and IL2CPP modules)
- Ensure you are switched over to Linux dedicated server build once modules are installed. You may need to restart your editor to accomplish this
- Open the HashGrid_Demo scene, and make sure this scene is included in Build Settings, not the default Sample Scene
- You shouldn’t need to do this, but in case you see complaints about Spawnable Prefabs being null, in the HashGrid_Demo scene, ensure NetworkManager has its Spawnable Prefabs set to Default Prefab Objects
- Install Docker Engine so that you can build Docker containers
- Step 1: Build our dedicated server
- Once again, ensure you have your platform set to dedicated server (linux)
- Also, on NetworkManager’s NetworkHudCanvas, ensure the Auto Start Type is set to Server.
- Use the Edgegap wizard and auth using the quick start token. It’s a little fidget-y, and you may need to create a new token and enter it for things to work
- In the build settings, make sure that the port is 7770
- Check the Tugboat component on NetworkManager. Make sure that it is 7770, and the client address is localhost.
- Build and push. You may need to restart Unity, the first time around this command was hanging for me.
- Step 2: Test the deployment
- Create a new deployment by clicking the button
- Switch back to desktop build mode (not dedicated server build mode). Or whatever client platform you’re on.
- In NetworkManager’s Tugboat component, set the client address to the address returned by the deployment. Set the server port to the port returned by the deployment.
- On NetworkManager’s NetworkHudCanvas, ensure the Auto Start Type is set to Disabled. We’ll toggle the Server / Client buttons ourselves.
- Press Play, toggle the Client button, and await a moment of truth.
- If all goes well, your client (the local Unity editor) should now be connected to your remote Edgegap deployment, and your circle character will be moving across a hash grid of dots
Created
February 28, 2024 09:51
-
-
Save nucleartide/811f5a7d2403185867eb444beb782d93 to your computer and use it in GitHub Desktop.
Setup instructions for FishNet and Edgegap that weren't necessarily mentioned in FirstGearGames' setup video.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment