コード例 #1
0
    private void Awake()
    {
        ushort port = GetCommandLinePort();

        if (port != 0)
        {
            Debug.LogFormat("Setting port to {0}", port);
            server.SetPort(port);
        }

        server.Run();
    }
コード例 #2
0
        private void Awake()
        {
            ushort port = GetCommandLinePort();

            // Set the port passed from the command line.
            if (port != 0)
            {
                Debug.LogFormat("Setting port to {0}", port);
                server.SetPort(port);
            }

            // Start the Arcus Server. Note, if the Component's RunOnAwake flag is set to true then this is
            // not needed. The example has the flag set to false to illustrate explicit running of the
            // Server so that the port can be set first (above).
            // The Server will listen for an Arcus Client.
            server.Run();
        }