🐟Getting Started with FishNet

Integrating FishNet with PlayFlow in your Unity project is easy and can significantly simplify the process of hosting multiplayer game servers. Here's a concise guide to get you started:

Make sure you have imported the FishNet and PlayFlow Unity packages.

FishNet Github PlayFlow Unity Package


FishNet Setup

In this example, we're going to be using an example scene included in the FishNet project as a reference. Feel free to replace the scene with any multiplayer scene that you would like to launch.

  1. Open Your Scene: Navigate to Assets > FishNet > Demos > Prediction V1 > CharacterController.unity to open the Character Controller Prediction scene included in the FishNet package. Note: You can use any example scene included with FishNet or use your own scene with a Network Manager for this as well.

  2. Build Settings: Verify that your scene is listed in Unity's Build Settings to ensure it is included in the build.


PlayFlow Setup

  1. Access PlayFlow Settings: Go to PlayFlow > PlayFlow Cloud from the Unity Toolbar to open the PlayFlow settings.

  1. Obtain Your Token: Log in to the PlayFlow Dashboard to retrieve your PlayFlow token.

  2. Select Your Scene: Choose the scene that contains your Network Manager, which in this example is the Character Controller Prediction scene.

  3. Upload Your Server Build: Start the upload of your server build. The upload duration will vary based on your game's size.

  4. Launch Servers:

    • Pick a server region from the dropdown list in the Launch Servers section.

    • Initiate your server. Initially, the server will display a "launching" status in the PlayFlow logs, transitioning to "running" after a brief period, which varies by your PlayFlow plan.

  1. Connect to Your Server: Once your server status is "running", note the IP address. Enter this IP into your Network Transport's client address field (Tugboat, in this example).

  2. You're Ready!

    With these steps, your game is now set up to connect players to your FishNet server hosted on PlayFlow.

Additional Information:

You can also view the logs of your game server by selecting your server and pressing the get logs button in the Unity plugin.

Last updated