Search Unity

I need some help..

Discussion in 'Multiplayer' started by Andre Gregoire, Sep 1, 2009.

  1. Andre Gregoire

    Andre Gregoire

    Joined:
    Aug 28, 2009
    Posts:
    32
    I can't understand why my code does not even generate RPC calls?
    Code (csharp):
    1.  
    2. if (GUILayout.Button ("Start Server"))
    3. {
    4.   Debug.Log("allo");
    5.   Network.useNat=true;
    6.   Network.InitializeServer(32, 35000);
    7. // Notify our objects that the level and the network is ready
    8.  
    9. foreach (GameObject go in (GameObject [])Object.FindObjectsOfType(typeof (GameObject)))
    10.  
    11. go.SendMessage("OnNetworkLoadedLevel", SendMessageOptions.DontRequireReceiver);
    12.            
    13. }
    Why does this code generate RPC calls in the networking example and not in mine?

    Do we have to connect to the master server?
    Or we can just run a server without connecting to the master server?

    I call a Network.Instantiate on a prefab and it does not even allocate a NetworkPlayerID looks like i'm not "connected" in some way.
    I sent the editor log with it.


    Another thing where do we add the levels when we added them in the Build (file->build&asset) do we have to script it because i don't see them in the Multiplayer example they seem to appear in the "Supportednetworklevel" list magically. (Loadlevel.js script)
     

    Attached Files:

  2. Andre Gregoire

    Andre Gregoire

    Joined:
    Aug 28, 2009
    Posts:
    32
    It's Ok don't answer that one i was very tired.