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

Caching.AddCache

Declaration

public static Cache AddCache(string cachePath);

Параметры

Параметр Описание
cachePath Путь к папке кэша.

Описание

Добавить кэш с указанным путем.

Это позволяет вам добавить новый кэш в список кэш. Будет возвращена ссылка на Кэш.

using System.IO;
using UnityEngine;

public class Example : MonoBehaviour { void AddCacheAtPath(string path) { if (!Directory.Exists(path)) Directory.CreateDirectory(path);

Cache newCache = Caching.AddCache(path);

//Make sure your new Cache is valid if (newCache.valid) { //If you wanted to set your newly created cache to the active cache Caching.currentCacheForWriting = newCache; } } }