Search Unity

Question Anyone have Sample MLAPI with Steam Matchmaking?

Discussion in 'Netcode for GameObjects' started by mertzwithunity34, Apr 23, 2021.

  1. mertzwithunity34

    mertzwithunity34

    Joined:
    Aug 26, 2019
    Posts:
    2
    Guys anyone have a Sample MLAPI with Steam Matchmaking? I have with old networking but There is a problem I cannot solve; I don't know what to replace the use of NetworkConnection with.

    I just want to Create/Join Lobby via Steam
     
  2. Arkitas

    Arkitas

    Joined:
    Oct 29, 2019
    Posts:
    4
    Last edited: Apr 26, 2021
  3. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    You should be able to use Steam Matchmaking with MLAPI by using the SteamP2P transport. Instead of writing a custom NetworkConnection with UNet you create a custom transport with MLAPI. You can take a look at the existing Steam transport, you should be able to just do Steam Matchmaking and then use that transport to connect: https://github.com/Unity-Technologi...ansports/com.mlapi.contrib.transport.steamp2p
     
    FlightOfOne likes this.
  4. CosmicStud

    CosmicStud

    Joined:
    Jun 13, 2017
    Posts:
    55
    @luke-unity Current steam transport has multiple dll issues and its in the packages folder and uneditable for platform settings. Or am I missing something?
     
  5. stumpytheangry

    stumpytheangry

    Joined:
    Jan 13, 2021
    Posts:
    8
    Did you ever have any luck with this?

    Cheers
     
  6. richardfu71

    richardfu71

    Joined:
    Mar 26, 2014
    Posts:
    4
    We adopted MLAPI early this year with SteamP2P transport, so far it's pretty stable when we have 100+ objects sync in a scene.

    Here's a demo I used to verify the connection at the very beginning:
    https://github.com/furic/MLAPI-Demo

    The demo allows you to host and connect through Steam, invite a friend to join the room, and contains some simple sync functions.
     
  7. leonhogan1

    leonhogan1

    Joined:
    Apr 21, 2020
    Posts:
    13
    that steamP2P link leads to a 404
     
  8. leonhogan1

    leonhogan1

    Joined:
    Apr 21, 2020
    Posts:
    13
    Is this demo up to date? Ive been trying to use it but Unity is telling me that MLAPI components are legacy, so ive tried to convert this demo to using Unity.Netcode, which is almost identical, but I keep getting a wierd NullReferenceException: Object reference not set to an instance of an object with NetworkManager.cs(line 1144): MessagingSystem.ProcessIncomingMessageQueue(); . What would you recommend?

    Thank you for making the demo btw, its taught a lot on how to make connections work.
     
  9. salvator23

    salvator23

    Joined:
    Sep 12, 2018
    Posts:
    5
    Are you able to properly start a client instance using the steamp2p transport?
    I'm currently stuck with the same error message you described, and i think that is why my clients are not able to connect via steam.

    See another post describing the same problem: https://answers.unity.com/questions/1869491/messagingsystemprocessincomingmessagequeue-nullref.html
     
    JuZDePeche likes this.
  10. unity_Bne3t-dfoOolzA

    unity_Bne3t-dfoOolzA

    Joined:
    Apr 8, 2020
    Posts:
    4
    nico_st_29 likes this.
  11. nico_st_29

    nico_st_29

    Joined:
    Mar 14, 2020
    Posts:
    69
    That's good to hear. Would you mind sharing a little more about what you did? Did you use that demo at all: https://github.com/furic/MLAPI-Demo?

    I'd be keen to fork this and just work with a few of us here to make it work properly with facepunch and the latest version of NetCode for GameObjects.
     
  12. unity_Bne3t-dfoOolzA

    unity_Bne3t-dfoOolzA

    Joined:
    Apr 8, 2020
    Posts:
    4
  13. leonhogan1

    leonhogan1

    Joined:
    Apr 21, 2020
    Posts:
    13
    Could you share the scene with this code? Im getting the error that "SingletonMB<SteamServer>" and "ServerGameNetPortal" arent recognized
     
    Last edited: Feb 22, 2022
  14. leonhogan1

    leonhogan1

    Joined:
    Apr 21, 2020
    Posts:
    13
    edin97 likes this.