Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    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:
    2
    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:
    796
    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:
    796
    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.