Unity 6.3
0 онлайн 3 гостей 3 в системе
Вход

AssetDatabase.GetCacheServerNamespacePrefix

Declaration

public static string GetCacheServerNamespacePrefix();

Возвращаемое значение

строка Возвращает префикс пространства имен для Сервера Кэширования.

Описание

Получает префикс пространства имен Сервера Кэширования, установленный в Настройках Редактора.

Обратите внимание: Если вы установите новое значение для префикса пространства имен, ваши новые настройки не будут применены до тех пор, пока вы не вызовете AssetDatabase.RefreshSettings(). Однако этот метод возвратит заданные вами значения независимо от того, применили вы эти настройки или нет.

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());

//This command is required to apply changes to some of the EditorSettings properties above AssetDatabase.RefreshSettings(); } }