Version 2.1.0.0

PersistentContextCache class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
[GlobalConfig(UseAsset = false)]
public class PersistentContextCache : GlobalConfig<PersistentContextCache>
Persistent Context cache object.
Inheritance

Constructors

PersistentContextCache()
public PersistentContextCache()

Properties

CacheSize
Estimated cache size in bytes.
public int CacheSize { get; }
EnableCaching
If true then persistent context is disabled entirely.
[ShowInInspector]
public bool EnableCaching { get; set; }
EntryCount
The current number of context entries in the cache.
public int EntryCount { get; }
MaxCacheByteSize
The max size of the cache in bytes.
[ShowInInspector]
[EnableIf("EnableCaching")]
[CustomValueDrawer("DrawCacheSize")]
[SuffixLabel("KB", false, Overlay = true)]
public int MaxCacheByteSize { get; }
WriteToFile
If true the context will be saved to a file in the temp directory.
[ShowInInspector]
[EnableIf("EnableCaching")]
public bool WriteToFile { get; set; }

Methods

DeleteCache()
Delete the persistent cache file.
[Button(ButtonSizes.Medium)]
[ButtonGroup("_DefaultGroup", 0)]
[EnableIf("EnableCaching")]
public void DeleteCache()

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.