Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

A few beginner questions about the networking changes in 2018.2 and Raknet

Discussion in 'Connected Games' started by SuperDanCraft_, Jul 13, 2018.

  1. SuperDanCraft_

    SuperDanCraft_

    Joined:
    Aug 12, 2015
    Posts:
    2
    So I've made a super-basic networking game to test the waters with Unity 2018.1
    Now I've updated the project to Unity 2018.2, and i get an error message that NetworkDisconnect and NetworkPlayer are obsolete.
    The 2018.2 blog post mentioned that something called Raknet was removed and that I have to use unity's new networking feature. Anyway this led me to wonder:
    • What exactly was Raknet? How was it integrated into Unity? How is it related to UNET and the HLAPI?
    • Why can't I use NetworkDisconnect and NetworkPlayer now?
    • What's this mysterious new networking feature that replaces Raknet? How can I use it?
    • How am I supposed to call OnDisconnectFromServer() and OnPlayerConnect() now? Am I supposed to? If not, what's the alternative?
    Any tiny bit of information helps, so thank you in advance!
     
  2. faldor20

    faldor20

    Joined:
    Feb 9, 2017
    Posts:
    3
    looking for the exact some thing. networking.peertype doesn't work and i cant figure out how to replace it
     
  3. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,053
    I could be mistaken, but it sounds like you're both using the old pre-UNET networking components.

    These have been removed from Unity 2018.2, so you'll either have to stick with an older version of Unity or change to a different networking system.
     
    SuperDanCraft_ likes this.
  4. SuperDanCraft_

    SuperDanCraft_

    Joined:
    Aug 12, 2015
    Posts:
    2
    I'm not sure where the line between pre-UNET networking and post-UNET networking is, but I do know that many of my gameobjects have Network Identity components and that I don't use any NetworkViews, which I understand has something to do with the old networking system.

    The only things which are broken in my project right now are the OnDisconnectedFromServer(NetwrokDisconnect) and OnPlayerConnect(NetworkPlayer) messages, because NetworkDisconnect and NetworkPlayer have been removed.
     
  5. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,053
    Being a Photon PUN user I'm not completely familiar with Unity's networking offerings, however I'm fairly certain the old Raknet based system isn't interchangeable with the newer UNET HLAPI.

    For what it's worth, my advice would be to steer clear of Unity's networking for the time being, unless you like lots of frustration.