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. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. 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
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

UNET message acknowledgement.

Discussion in 'Connected Games' started by MaxZemsky, Aug 12, 2018 at 7:48 PM.

  1. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    I am using the NetworkServer.SendToAll method - I need to know when a message has successfully reached all the clients (the second message should be sent only when the first message has been received by all the Clients). How can I do this?
    Thanks!
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    Shortly, no way. We did think about notifications, but now i afraid that is not possible. Sorry about :( you are still able to implement this on top of transport by receiving ack from all peers. For ack i think allcost qos should be used
     
  3. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    I send a big about of positions updates over the UNET. In certain point the network bandwidth reaches it's maximum (1.5MB/sec). Is there a way i could monitor it to prevent this?
    Originally, i thought to send the next message only when the previous message has been received by all the clients. Is there any workaround that i can implement?
     
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545
    two things if you want just monitor your bandwidth, you can use bandwidth related statistical functions provided by library. If you want to avoid false receiving on your Send() call, you can provide set sendable callback, which will hit every time when library will have space for new message. Examples - see server.dll documentation and library reference.
     
  5. MaxZemsky

    MaxZemsky

    Joined:
    Nov 7, 2017
    Posts:
    14
    Thank you for your fast reply.
    In the server documentation i have found the following callback:
    Code (CSharp):
    1. GlobalConfig config = new GlobalConfig();
    2. config.SendCallback = new SendCallbackDelegate(SendCallback);
    Is this the "sendable callback" you were talking about?

    However, i cannot find this callback function in the UnityEngine.Networking.GlobalConfig class.

    Am i missing something?
     
  6. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    545