Search Results for

    Show / Hide Table of Contents

    FishNet

    FishNet is a free networking framework for Unity by FirstGearGames available under a custom license.

    Getting Started

    Automatic Installation

    To automatically install FishNet, Git must be installed on your machine. After installing Git, you may need to restart Unity before continuing with the automatic installation.

    With Git installed, from the top menu, go to Tools > Kaiju Solutions > Multiplayer Engine > Integrations > Install > FishNet. If you have other networking libraries installed, it will prompt you to ask if you wish to uninstall them. It is recommended to do this to ensure conflicts do not happen. Once installed, if you have any other networking integrations in the project, you will also be prompted to remove them. This is also recommended to ensure you do not accidentally use the wrong components from the other networking integrations.

    Manual Installation

    If you choose not to install Git, you can still install FishNet manually by getting the latest .unitypackage from GitHub or downloading it from the Unity Asset Store.

    Components

    The integration is composed of two components, being a transport for sending data over the network and a component to synchronize users over the network.

    Transport

    The KaijuTransport component is the core of the integration. To use it, assign it to your FishNet NetworkManager. You do not need to access most properties or methods manually on the KaijuTransport, but there are a few which are relevant:

    • KaijuTransport.Channel - The main channel over which information is sent.
    • KaijuTransport.Lifetime - A secondary channel over which networking handshaking is performed.
    • KaijuTransport.autoConnect - If you wish to automatically start FishNet when joining a lobby. For most simple use cases, you will want to keep this enabled. However, if you are interested in creating a pre-match character selection or group matchmaking screen, you may consider turning this off. If turned off, you will need to later call KaijuTransport.Connect() once ready in the lobby to start FishNet.
    • KaijuTransport.autoDisconnect - Determines if the client should leave the lobby when FishNet shuts down. If you wish to implement custom host migration, turn this off.

    Host Migration

    FishNet does not support host migration out of the box. However, KMPE gives you a means to implement your own custom host migration. First, disable KaijuTransport.autoDisconnect. Then, listen for the KaijuTransport.OnStopping callback. When triggered, you should serialize all information needed for migration to continue the game. Then, if you are the new owner which can be checked by MultiplayerManager.IsOwner, call KaijuTransport.Connect() to start a new game, and load all the serialized information. Lastly, indicate to other members in the lobby that the migrated game is ready, and they will then call KaijuTransport.Connect() themselves. If the members also need to load any serialized migration data, they can then do so.

    User Link

    The KaijuUserLink component provides an easy means to synchronize Kaiju Users with the network identifiers they are assigned by FishNet. In most use cases, you will want to attach a KaijuUserLink component to your player prefab, and KMPE will handle the synchronization with a KaijuUser component allowing you to easily access the user's name and icon. For more on the KaijuUser component and getting user information, see the users documentation. If you wish to access the synchronized identifiers outside of the KaijuUserLink component, you can use the KaijuTransport.SteamToFishNet(ulong) and KaijuTransport.FishNetToSteam(int) methods.

    Sample

    To access the sample, open the package manager window by going to Window > Package Management > Package Manager. In the In Project tab, click on Kaiju Multiplayer Engine and click the Samples tab. First, import the Common sample followed by the FishNet sample. Then, from the top menu, go to Tools > Kaiju Solutions > Multiplayer Engine > Samples > FishNet to generate the sample scene.

    Resources

    • Official documentation.
    • The FirstGearGames YouTube channel; the creators of FishNet.
    • The Winterbolt Games YouTube channel.
    • The FishNet playlist by Winterbolt Games.
    • The FishNet playlist by Bobsi Tutorials.

    Testing

    To test your game's multiplayer functionality locally, check out the testing documentation.

    In This Article
    Back to top © 2025 Kaiju Solutions Inc.