Skip to content

Cache

Purpose

Owns thumbnail cache abstractions and cache implementations used throughout Snap Studio Pro.

This territory provides reusable thumbnail storage, retrieval, cleanup, and cache-lifecycle management for prefab thumbnail workflows.

Owns

  • Thumbnail cache contracts
  • Thumbnail cache implementations
  • Global thumbnail cache access
  • Thumbnail texture storage
  • Thumbnail retrieval helpers
  • Cache clearing/cleanup workflows
  • Texture destruction ownership

Does NOT Own

  • Thumbnail rendering implementation
  • Thumbnail generation orchestration
  • Prefab browser UI
  • Preview scene lifecycle ownership
  • Export workflows
  • Rendering pipeline implementation

Allowed Dependencies

Cache may depend on:

  • Unity texture APIs
  • Diagnostics/logging
  • Lightweight thumbnail abstractions/contracts

Cache should avoid depending on:

  • preview systems
  • export systems
  • panel UI systems
  • rendering implementation systems

Notes

Cache owns: - thumbnail storage - thumbnail lookup - texture cleanup responsibilities - cache lifecycle management

ThumbnailGeneration systems own: - how thumbnails are produced

PrefabBrowser owns: - how thumbnails are displayed and interacted with

This separation keeps cache infrastructure reusable and prevents thumbnail rendering logic from leaking into UI systems.

ThumbnailCache intentionally owns explicit Texture2D destruction behaviour because editor thumbnail workflows can otherwise leak GPU memory during long-running sessions.

The cache provider exists as lightweight editor infrastructure, not a generalized service locator.

Future Candidates

  • Continue maintaining explicit texture cleanup ownership.
  • Keep cache systems lightweight and predictable.
  • Avoid embedding thumbnail rendering behaviour into cache implementations.
  • Maintain separation between cache infrastructure and prefab browser UI.