FishySteamworks

repository·main·Indexed 41 days ago

https://github.com/firstgeargames/fishysteamworks

A transport implementation for Fish-Networking (version 4.1.0) that enables multiplayer connectivity via the Steamworks API and Steam relay (Peer to Peer) in Unity. It requires FishNet, .Net 4.5x, and Steamworks.NET to function.

Tokens
661
Snippets
1
Records
4
Agent score
50%

What's inside FishySteamworks

  1. Connect a client to a host using steamId64

    main

    Clients connect to a host using the host's steamId64.

    Finding a steamId64

    1. Open Steam and go to View > Settings > Interface.
    2. Ensure 'Display web address bars when available' is checked.
    3. View your profile in Steam. The steamId64 is the large number at the end of your profile URL.

    Connecting via Unity Inspector

    Input the host's steamId64 into the 'Client Address' field of the FishySteamworks component and start the client.

    Connecting via Code

    You can programmatically start a connection by passing the steamId64 to the ClientManager:

    ClientManager.StartConnection(steamId64);
  2. Configure FishySteamworks in Unity

    main

    Follow these steps to set up the transport within your Unity project:

    1. Add Component: Add the FishySteamworks component to your NetworkManager object. You must either remove existing transports or add a TransportManager and specify FishySteamworks as the transport to use.
    2. Connection Mode: Choose Peer to Peer to connect using the Steam relay.
    3. Set AppId: Configure your Steam AppId in the component.
    4. SteamManager: You may need to add a SteamManager to your NetworkManager object. If you require a SteamManager to get started, import FishNet\Plugins\FishySteamworks\SteamManager.unitypackage.

    Note: Some frameworks (like Heathen Engineering) use their own versions of SteamManager. Consult their community resources if you are using their assets.

  3. Install FishySteamworks

    main

    To install FishySteamworks in your Unity project:

    1. Download the latest release from the releases page.
    2. Open and import FishySteamworks.unitypackage into your project.

    Prerequisites

    Before using this transport, ensure the following are installed and working:

    • Fish-Networking: FishNet
    • .Net 4.5x
    • Steamworks.NET: FishySteamworks relies on Steamworks.NET to communicate with the Steamworks API. You can find an installation guide here.
  4. Local testing limitations and workarounds

    main

    Due to Steam's limitations, you cannot connect to yourself locally using two separate builds on a single device via Steamworks.

    • To test with two builds/editors on one device: You must use the default transport instead of FishySteamworks.
    • To test using FishySteamworks: You must use two separate Steam IDs on two separate physical devices.
    • Single-device testing: You can run both the server and the client within a single executable to test the logic on one device.