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

Call function on server before any OnStartClient

Discussion in 'Multiplayer' started by Wrymnn, Jun 6, 2016.

  1. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    Hi,

    I need to call method to generate level before any OnStartClient() is called for on players. Not sure why OnStartSever() is not called first, but host`s OnStartClient() is.

    I just need to generate level as soon as game scene is loaded from lobby.
    Even OnLobbyServerSceneChanged() is called After OnStartClient().

    Thanks for any help.
     
  2. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    cmon guys, 40+ seen this topic and nobody knows one function that runs before all client "OnStartClient" functions?
     
  3. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    I better pick up Photon then use this mess....
     
  4. Oshroth

    Oshroth

    Joined:
    Apr 28, 2014
    Posts:
    99
    OnStartServer() should be getting called first according to the Networking source code
     
  5. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    352
    It is not calling for me. The host`s OnStartClient() is called first according to console log.