Search Unity

Unity networking what to use in new game if used with udp server ?

Discussion in 'Multiplayer' started by umen, Apr 11, 2020.

  1. umen

    umen

    Joined:
    Oct 2, 2012
    Posts:
    49
    hello all
    im new to unity , i like to create simple demo which send UDP to UDP server .
    im reading that the unet is deprecated and i read that there is some new networking layer in the works NewCode?
    i downloaded the multiplayer sample .
    and now i donet know what to choose .
    what network libarary should i use ?
    thanks
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    Google "C# send udp packet" and use that.
     
  3. umen

    umen

    Joined:
    Oct 2, 2012
    Posts:
    49
    so i understand i can use native c# UDP ?
    what about ENet-CSharp? any games are using it?
    how can i include it in unity ?
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    Your goal is to "make a demo that send udp". So use simplest solution available.
    Regarding the example you linked you can download it into your project, and see i it works or not.
    Additionally, regarding "so I understand"... why haven't you tried to use C# sockets in the first place? You don't need to ask for a permission, just try things and see if they work.
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Have you tried downloading and examining the contents of the compressed archive for Unity? Inside is a root folder with a Plugins folder and a Scripts folder. You simply need to extract the archive and drag the root folder into your project.

    https://github.com/nxrighthere/ENet-CSharp/releases
     
    Last edited: Apr 11, 2020
  6. umen

    umen

    Joined:
    Oct 2, 2012
    Posts:
    49
    im not coming from c sharp background , as it wrapper to the great enet library .
    do i need to compile the C lib first ?
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I haven't used Enet, but I'd give their precompiled Unity zip file a try first.