Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Why is OnClientConnect called multiple times for one client

Discussion in 'Multiplayer' started by rishi-ranjan, Oct 9, 2015.

  1. rishi-ranjan

    rishi-ranjan

    Joined:
    Oct 7, 2015
    Posts:
    22
    I have integrated UNET in 2dshooter sample. When I start the game in host mode, OnClientConnect gets called multiple time. My understanding is that this should have been called once when client connects to server.

    Is my understanding wrong?
     
  2. rishi-ranjan

    rishi-ranjan

    Joined:
    Oct 7, 2015
    Posts:
    22
    My bad. I was sending a bad structure using NetworkMsg which was resulting into continues try by client to conenct to server.