GetOrCreateSettings() static private method

static private GetOrCreateSettings ( ) : MeshSyncProjectSettings
return MeshSyncProjectSettings
Exemplo n.º 1
0
        void Reset()
        {
            MeshSyncProjectSettings projectSettings = MeshSyncProjectSettings.GetOrCreateSettings();

            m_config     = new MeshSyncServerConfig(projectSettings.GetDefaultServerConfig());
            m_serverPort = projectSettings.GetDefaultServerPort();
        }
Exemplo n.º 2
0
        void Reset()
        {
            MeshSyncProjectSettings projectSettings = MeshSyncProjectSettings.GetOrCreateSettings();

            m_config     = MeshSyncProjectSettings.CreatePlayerConfig(MeshSyncPlayerType.SERVER);
            m_serverPort = projectSettings.GetDefaultServerPort();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Starts the server. If the server is already running, it will be restarted.
        /// </summary>
        public void StartServer()
        {
#if UNITY_STANDALONE
            StopServer();

#if UNITY_EDITOR
            //Deploy HTTP assets to StreamingAssets
            DeployStreamingAssets.Deploy();
#endif
            MeshSyncProjectSettings projectSettings = MeshSyncProjectSettings.GetOrCreateSettings();


            m_serverSettings.port = (ushort)m_serverPort;
            m_serverSettings.zUpCorrectionMode = (ZUpCorrectionMode)m_config.ZUpCorrection;

            m_server = Server.Start(ref m_serverSettings);
            m_server.fileRootPath = GetServerDocRootPath();
            m_server.AllowPublicAccess(projectSettings.GetServerPublicAccess());

            m_handler = HandleRecvMessage;

#if UNITY_EDITOR
            EditorApplication.update += PollServerEvents;
#endif
            if (m_config.Logging)
            {
                Debug.Log("[MeshSync] Server started (port: " + m_serverSettings.port + ")");
            }

            m_serverStarted = true;
#else
            Debug.LogWarning("[MeshSync] Server functions are not supported in non-Standalone platform");
#endif //UNITY_STANDALONE
        }
Exemplo n.º 4
0
//----------------------------------------------------------------------------------------------------------------------

        #region Events
#if UNITY_EDITOR
        void Reset()
        {
            MeshSyncProjectSettings projectSettings = MeshSyncProjectSettings.GetOrCreateSettings();

            m_config = new SceneCachePlayerConfig(projectSettings.GetDefaultSceneCachePlayerConfig());
        }