Fishnet
Explore how to host Unity projects on Edgegap using techniques from the FishNet HashGrid Sample.
✔️ Preparation
Before we start, you will need:
Unity 6 - download using Unity Hub,
FishNet Unity package - download from Unity Asset Store,
this package includes the HashGrid sample.
Create a new project and import the FishNet package above.
⚡ Deploy and Connect
1. Deploy a Server on Edgegap
☑️ To get started, you'll need to create a free account with Edgegap. No credit card required.
☑️ Create a new app version for your application, choose FishNet HashGrid Sample.
☑️ Deploy a server with your FishNet HashGrid Sample app version.
☑️ Open your new deployment's details.
☑️ Find your deployment's unique, one-time connection details:
Host URL in format
780aa4260e83.pr.edgegap.net,External Port in format
30854(5 digits).
✅ You may now proceed to the next step.
2. Connect from Editor
☑️ Open your new project in Unity.
☑️ Open scene in folder FishNet / Demos / HashGrid / Scenes / HashGrid_Demo.unity.
☑️ Select NetworkManager object in the scene, and modify Tugboat component in Inspector:
set Client / Client Address to Host URL from previous step,
set Server / Port to External Port from previous step.
☑️ Expand NetworkManager child game objects and select NetworkHudCanvas, then set Auto Start Type to Disabled to prevent your editor from starting in client-host mode.
☑️ Press the ▶️ Play button to start your game client.
☑️ Press Client button to connect to your server.
☑️ Connect a second virtual Player with Multiplayer Play Mode or ParrelSync.
🙌 Congratulations on your first Deployment on Edgegap!
✏️ Customize Server Build
To ensure your server build starts properly:
edit your build profile (Edit Build Settings in Edgegap plugin) and add your scene,
set
Auto Start TypetoServerinNetworkHudCanvasescomponent (child ofNetworkManager),enable
Reuse Server Addressin yourTugboatcomponent to prevent errorAddressAlreadyInUse.
See Getting Started - Servers for Unity to learn how to build and customize servers.
Last updated
Was this helpful?

