Persistent cache for scene object mesh hashes using ScriptableObject storage Dramatically speeds up Clone Inspector window opening by avoiding recalculation. More...
Classes | |
| struct | CachedHashEntry |
| struct | CacheStats |
Public Member Functions | |
| string | GetCachedHash (GameObject gameObject, string hashType="hierarchical") |
| Gets cached hash for a GameObject, returns null if not cached or invalid hashType: "hierarchical" or "single" to specify which hash type to retrieve. | |
| void | SetCachedHash (GameObject gameObject, string hash, string hashType="hierarchical") |
| Stores hash for a GameObject in the cache hashType: "hierarchical" or "single" to specify which hash type to store. | |
| void | RemoveCachedHash (GameObject gameObject, string hashType=null) |
| Removes hash for a GameObject from cache hashType: "hierarchical", "single", or null to remove all hash types for this object. | |
| void | ClearCache () |
| Clears all cached hashes. | |
| CacheStats | GetCacheStats () |
| Gets cache statistics. | |
| void | CleanupCache () |
| Removes invalid/orphaned entries from cache. | |
| void | SaveCache () |
| Forces save of cache to disk. | |
| void | SaveCacheDeferred () |
| Deferred save - schedules save for next editor update to avoid blocking. | |
| void | SetCachedHashBatch (Dictionary< GameObject, string > hashPairs, string hashType="hierarchical") |
| Batch operation: sets multiple cache entries without triggering save for each. | |
Static Public Member Functions | |
| static SceneHashCache | GetOrCreateForCurrentScene () |
| Gets or creates the cache asset for the current scene. | |
Detailed Description
Persistent cache for scene object mesh hashes using ScriptableObject storage Dramatically speeds up Clone Inspector window opening by avoiding recalculation.
Class Documentation
◆ realvirtual::SceneHashCache::CachedHashEntry
| struct realvirtual::SceneHashCache::CachedHashEntry |
◆ realvirtual::SceneHashCache::CacheStats
| struct realvirtual::SceneHashCache::CacheStats |
Member Function Documentation
◆ CleanupCache()
| void realvirtual.SceneHashCache.CleanupCache | ( | ) |
Removes invalid/orphaned entries from cache.
◆ ClearCache()
| void realvirtual.SceneHashCache.ClearCache | ( | ) |
Clears all cached hashes.
◆ GetCachedHash()
| string realvirtual.SceneHashCache.GetCachedHash | ( | GameObject | gameObject, |
| string | hashType = "hierarchical" |
||
| ) |
Gets cached hash for a GameObject, returns null if not cached or invalid hashType: "hierarchical" or "single" to specify which hash type to retrieve.
◆ GetCacheStats()
| CacheStats realvirtual.SceneHashCache.GetCacheStats | ( | ) |
Gets cache statistics.
◆ GetOrCreateForCurrentScene()
|
static |
Gets or creates the cache asset for the current scene.
◆ RemoveCachedHash()
| void realvirtual.SceneHashCache.RemoveCachedHash | ( | GameObject | gameObject, |
| string | hashType = null |
||
| ) |
Removes hash for a GameObject from cache hashType: "hierarchical", "single", or null to remove all hash types for this object.
◆ SaveCache()
| void realvirtual.SceneHashCache.SaveCache | ( | ) |
Forces save of cache to disk.
◆ SaveCacheDeferred()
| void realvirtual.SceneHashCache.SaveCacheDeferred | ( | ) |
Deferred save - schedules save for next editor update to avoid blocking.
◆ SetCachedHash()
| void realvirtual.SceneHashCache.SetCachedHash | ( | GameObject | gameObject, |
| string | hash, | ||
| string | hashType = "hierarchical" |
||
| ) |
Stores hash for a GameObject in the cache hashType: "hierarchical" or "single" to specify which hash type to store.
◆ SetCachedHashBatch()
| void realvirtual.SceneHashCache.SetCachedHashBatch | ( | Dictionary< GameObject, string > | hashPairs, |
| string | hashType = "hierarchical" |
||
| ) |
Batch operation: sets multiple cache entries without triggering save for each.