This repository was archived by the owner on Aug 17, 2026. It is now read-only.
Bug-58: Cache for Downloads - #128
Merged
Merged
Conversation
added 14 commits
May 27, 2026 19:57
This was referenced May 30, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds disk-backed caching for downloaded sprites/models in the shared Unity package, plus DTO timestamp fields needed for cache invalidation and an abstraction for GLTF loading.
Changes:
- Adds
CacheManager,DiskService, andIGltfLoaderto support cached asset retrieval. - Routes
SpriteManagerthrough the cache and propagatesupdated_atfields through sprite/model/world DTOs. - Extends model downloading to support persistent cache paths and adds a caching setting flag.
Reviewed changes
Copilot reviewed 12 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
Runtime/Core/Cache/CacheManager.cs |
Implements sprite/model cache lookup, invalidation, persistence, and cleanup APIs. |
Runtime/Core/Cache/DiskService.cs |
Adds binary disk read/write/delete helpers under persistent data. |
Runtime/Core/Interfaces/IGltfLoader.cs |
Defines an interface for loading GLTF model bytes. |
Runtime/Core/Utils/DateTimeHelper.cs |
Adds shared timestamp parsing/formatting helpers. |
Runtime/Core/Systems/Characters/SpriteManager/SpriteManager.cs |
Uses CacheManager for sprite texture downloads. |
Runtime/Core/Systems/API/AssetsService.cs |
Adds world CDN sprite URL handling and propagates sprite updated_at. |
Runtime/Core/Systems/API/ModelService.cs |
Allows model downloads to target temp or persistent cache paths. |
Runtime/Core/Systems/API/WorldService.cs |
Propagates world update timestamp into active world data. |
Runtime/Core/Systems/API/DTOs/AssetsDTOs.cs |
Adds updated_at to sprite responses. |
Runtime/Core/Systems/API/DTOs/ModelDTOs.cs |
Adds updated_at to model info. |
Runtime/Core/Systems/API/DTOs/WorldDTOs.cs |
Adds update timestamp to active world data. |
Runtime/Models/Settings/SettingsData.cs |
Adds an enableCaching setting field. |
*.meta files |
Adds Unity metadata for new folders/files. |
Files not reviewed (7)
- Runtime/Core/Cache.meta: Language not supported
- Runtime/Core/Cache/CacheManager.cs.meta: Language not supported
- Runtime/Core/Cache/DiskService.cs.meta: Language not supported
- Runtime/Core/Interfaces.meta: Language not supported
- Runtime/Core/Interfaces/IGltfLoader.cs.meta: Language not supported
- Runtime/Core/Utils.meta: Language not supported
- Runtime/Core/Utils/DateTimeHelper.cs.meta: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Bundle:
Additions:
GetModelandGetSpritefunction, if it has them in disk will load from there and if it doesnt have it or the cache was invalidated by the updatedAt then it downloads from CDN.SpriteManagerIGltfLoaderinterface to be able to implement differently in editor and game