Пример #1
0
 /// <summary>
 /// Disposes the build cache instance.
 /// </summary>
 public void Dispose()
 {
     if (m_Downloader != null)
     {
         m_Downloader.Dispose();
     }
     m_Uploader   = null;
     m_Downloader = null;
 }
Пример #2
0
 public void Dispose()
 {
     SyncPendingSaves();
     if (m_Uploader != null)
         m_Uploader.Dispose();
     if (m_Downloader != null)
         m_Downloader.Dispose();
     m_Uploader = null;
     m_Downloader = null;
 }
Пример #3
0
        public BuildCache(string host, int port = 8126)
        {
            m_GlobalHash = CalculateGlobalArtifactVersionHash();

            if (string.IsNullOrEmpty(host))
                return;

            m_Uploader = new CacheServerUploader(host, port);
            m_Downloader = new CacheServerDownloader(this, host, port);
        }
Пример #4
0
        public BuildCache(string host, int port = 8126)
        {
            if (string.IsNullOrEmpty(host))
            {
                return;
            }

            m_Uploader   = new CacheServerUploader(host, port);
            m_Downloader = new CacheServerDownloader(this, host, port);
        }
Пример #5
0
        /// <summary>
        /// Creates a new remote build cache object.
        /// </summary>
        /// <param name="host">The server host.</param>
        /// <param name="port">The server port.</param>
        public BuildCache(string host, int port = 8126)
        {
            m_GlobalHash = CalculateGlobalArtifactVersionHash();

            if (string.IsNullOrEmpty(host))
            {
                return;
            }

            try
            {
                m_Uploader   = new CacheServerUploader(host, port);
                m_Downloader = new CacheServerDownloader(this, host, port);
            }
            catch (Exception e)
            {
                m_Uploader   = null;
                m_Downloader = null;
                string msg = $"Failed to connect build cache to CacheServer. ip: {host}, port: {port}. With exception, \"{e.Message}\"";
                m_Logger.AddEntrySafe(LogLevel.Warning, msg);
                UnityEngine.Debug.LogWarning(msg);
            }
        }