Пример #1
0
            public void Awake()
            {
                _net = FindObjectOfType <PureP2PCommsNetwork>();
                _net.InitializeAsServer(_sessionId);

                _comms = FindObjectOfType <DissonanceComms>();
            }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.S))
        {
            //   sessionId= p2p.SessionId;
            p2p.InitializeAsServer(sessionId);
        }
        if (Input.GetKeyDown(KeyCode.C))
        {
            //         sessionId = p2p.SessionId;

            p2p.InitializeAsClient(sessionId);
        }
    }