Мои Уведомления
Привет, !
Мой Аккаунт Мои Финансы Мои Подписки Мои Настройки Выход
Руководство API скрипты

AssetDatabase.GetCacheServerEnableUpload

Объявление

public static bool GetCacheServerEnableUpload();

Возвращает

bool Возвращает true, если включена загрузка на сервер кэширования. В противном случае возвращает false.

Описание

Получает параметр загрузки сервера кэширования из настроек редактора.

using UnityEngine; using UnityEditor; public class AssetDatabaseExamples : MonoBehaviour { [MenuItem("AssetDatabase/Set Cache Server Project Settings")] static void SetCacheServerProjectSettings() { EditorSettings.cacheServerMode = CacheServerMode.Enabled; Debug.Log("Is Cache Server enabled? - " + AssetDatabase.IsCacheServerEnabled()); EditorSettings.cacheServerEndpoint = "192.168.31.210:10443"; Debug.Log("Cache Server IP and Port number: " + AssetDatabase.GetCacheServerAddress() + ":" + AssetDatabase.GetCacheServerPort()); EditorSettings.cacheServerEnableAuth = false; EditorSettings.cacheServerEnableTls = false; EditorSettings.cacheServerEnableDownload = true; Debug.Log("Is Cache Server download enabled? - " + AssetDatabase.GetCacheServerEnableDownload()); EditorSettings.cacheServerEnableUpload = true; Debug.Log("Is Cache Server upload enabled? - " + AssetDatabase.GetCacheServerEnableUpload()); EditorSettings.cacheServerNamespacePrefix = "default"; Debug.Log("Cache Server Namespace prefix: " + AssetDatabase.GetCacheServerNamespacePrefix()); //Эта команда необходима для применения изменений к некоторым свойствам EditorSettings выше AssetDatabase.RefreshSettings(); } }
Вы можете отблагодарить автора, за перевод документации на русский язык. ₽ Спасибо
API скрипты 2021.3