Esempio n. 1
0
    void Start()
    {
        if (saveBetweenScenes)
        {
            DontDestroyOnLoad(gameObject);
        }

        // Initialize log4net adapter
        SlimNet.Log.SetAdapter(new SlimNetConsole.LogAdapter());

        // Create server
        Instance = SlimNet.Unity.Server.Create(port);

        if (listenOnStart)
        {
            Instance.Start();
        }
    }
    void Start()
    {
        if (saveBetweenScenes)
        {
            DontDestroyOnLoad(gameObject);
        }

        // Initialize log4net adapter
        SlimNet.Log.SetAdapter(new SlimNetConsole.LogAdapter());

        // Create server
        Instance = SlimNet.Unity.Server.Create(port);

        if (listenOnStart)
        {
            Instance.Start();
        }
    }