🐟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 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.
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.Build Settings: Verify that your scene is listed in Unity's Build Settings to ensure it is included in the build.
PlayFlow Setup
Access PlayFlow Settings: Go to
PlayFlow > PlayFlow Cloud
from the Unity Toolbar to open the PlayFlow settings.
Obtain Your Token: Log in to the PlayFlow Dashboard to retrieve your PlayFlow token.
Select Your Scene: Choose the scene that contains your Network Manager, which in this example is the Character Controller Prediction scene.
Upload Your Server Build: Start the upload of your server build. The upload duration will vary based on your game's size.
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.
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).
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