Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Unity Multiplayer UNET manual/scripting reference

Discussion in 'Multiplayer Networking' started by nporaMep, Jun 9, 2015.

  1. nporaMep

    nporaMep

    Joined:
    Oct 31, 2014
    Posts:
    33
    Hi
    Unity 5.1 is released and old networking is marked as deprecated, but there is no documentation on a new networking.
    I tried to move from old networking to new (I mostly use RPC calls) from info I got from Unite 2014's video on UNET, but it is not enough.

    When will be documentation available?
     
  2. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    3,508
  3. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    122
    Hopefully soon, but you can access the new documentation from unity via Help -> Unity Manual / Scripting Reference until they update the online documentation.
     
  4. Necromantic

    Necromantic

    Joined:
    Feb 11, 2013
    Posts:
    47
    Sadly enough it seems that a lot of the manual (online and offline) is still outdated or just incompatible with the released 5.1 build.
    For example, a lot of the default method calls shown on http://docs.unity3d.com/Manual/UNetManager.html just don't work as they are shown and the offline manual is even worse.

    I also still have the issues discussed here:
    http://forum.unity3d.com/threads/failed-to-read-the-id-for-the-match-maker.326167/
    (Okay, this resolved itself a similar way as mentioned in the thread now. After opening multiple of the example networking projects some people posted (that all had the same problem) and repasting and spamming enter on the input field and restarting the Editor multiple times at some point it just started to work. Seems like it just doesn't set the property correctly at random.)

    And here:
    http://forum.unity3d.com/threads/unet-matchmaking-and-the-webplayer.332364/

    Is it just me or is that a general problem? Running Unity 5.1.0f3 Personal 64Bit Editor.
     
    Last edited: Jun 13, 2015
    erebel55 likes this.
  5. HuskyPanda213

    HuskyPanda213

    Joined:
    Mar 24, 2013
    Posts:
    37
    @Necromantic
    It's not just you, I have a lot of problems with different names of functions and variables of the networking system. Sometimes functions in the manual don't even exist in the build (5.1.0f3).
     
  6. shadiradio

    shadiradio

    Joined:
    Jun 22, 2013
    Posts:
    60
    Dmitriy-Yukhanov likes this.
  7. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    369
  8. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    864
    @_Adriaan

    Try using the Bug Reporter in Unity to report Documentations. There's a new category for it.
     
  9. dylanh7244

    dylanh7244

    Joined:
    Jan 12, 2016
    Posts:
    379
    The Dec 2016 docs/demos for lobby are still not updated :/
     
  10. dylanh7244

    dylanh7244

    Joined:
    Jan 12, 2016
    Posts:
    379
    If you couldn't tell from seeing no dev posts for the past YEAR in this networking forum for anything related to UNET, HLAPI, Host Migration or Lobby, it's quite obvious that UNET HLAPI and anything relating to Unity online multiplayer is more or less abandoned by Unity. I called it back in September in a thread bumped for months and it was never denied:

    https://forum.unity3d.com/threads/unity-hello-is-there-anybody-out-there-p.445978/

    I hope these docs and video will assist you. Although these docs are still 100x more useful than anything official that exists, fair warning I've abandoned it in favor of Photon (where I had a lobby running in 2hrs vs 2 months where it's still broke. And Photon is heavily documented and supported) so it's still outdated. I'm fairly certain none of these modules have even been updated or will be updated for 2017 since it's not on the road map, so will probably still be fine. I hope this helps you:



    https://forum.unity3d.com/threads/h...icial-documentation-please-contribute.446516/

    Unity LAN games seem excellent as long as you don't have a lobby. However, if you use a lobby in any way, hope for reconnection or host migration, use HLAPI or UNET, run while you can.

    I'd love for the devs to follow up on their promises and can't wait for them to prove me wrong. However, I coded my entire game under the faith of promises that were never fulfilled and had to recode my entire game. I wouldn't wish this on the world to a fellow indie dev. I love Unity, just hate that they have 0 staff 0 support while completely abandoning not only these modules, but also their customers that are desperately trying to use it since it's still advertised when it shouldn't be. Find me in ANY other sub forum and I only have good things to say about them. Minus level 11 ;)
     
    Last edited: Feb 4, 2017
    Artaani likes this.
  11. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    211
    Oh yes. We spend several month by trying to figure out how to work with UNET only because "NetworkView.RPC is obsolete, use UNET".

    Unity always made a revolutions. With first Unity network with Mecanim, with NavMesh, with Asset Store!
    What a shame to look at this fail with UNET.
     
  12. Wobes

    Wobes

    Joined:
    Mar 9, 2013
    Posts:
    264
    https://unity3d.com/ru/learn/tutorials/topics/multiplayer-networking/networking-player-health

    Devs missed assigning of value in the SyncVar hook

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using UnityEngine.Networking;
    4. using System.Collections;
    5.  
    6. public class Health : NetworkBehaviour {
    7.  
    8.     public const int maxHealth = 100;
    9.  
    10.     [SyncVar(hook = "OnChangeHealth")]
    11.     public int currentHealth = maxHealth;
    12.  
    13.     //    
    14.  
    15.     void OnChangeHealth (int health)
    16.     {
    17.         healthBar.sizeDelta = new Vector2(health, healthBar.sizeDelta.y);
    18.     }
    19. }

    should be

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using UnityEngine.Networking;
    4. using System.Collections;
    5.  
    6. public class Health : NetworkBehaviour {
    7.  
    8.     public const int maxHealth = 100;
    9.  
    10.     [SyncVar(hook = "OnChangeHealth")]
    11.     public int currentHealth = maxHealth;
    12.  
    13.     //  
    14.  
    15.     void OnChangeHealth (int health)
    16.     {
    17.         currentHealth = health; // fix
    18.         healthBar.sizeDelta = new Vector2(health, healthBar.sizeDelta.y);
    19.     }
    20. }
     
  13. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    864
    You should cross-post your findings to the Documentation subforum.
     
  14. Wobes

    Wobes

    Joined:
    Mar 9, 2013
    Posts:
    264
    Will do, thanks
     
  15. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    19
    Yeah check near the top threads here, look for vis2k, unity won't fix it so he is working on it.