Search Unity

What is the difference between close and disconnect on NetworkConnection?

Discussion in 'Unity Transport' started by TheCelt, Sep 18, 2021.

  1. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    I am unsure on the difference between these two functions, when would you use one or the other?

    Does closing automatically call disconnect? What's the main difference?
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    441
    A bit late with the answer, but for future reference: there's not really any difference between the two. You can use either one to the same effect. And to preempt the follow-up question: I have no idea why we have two methods to do the same thing.