Fix 5: iOS Safari scoped asset loading and memory management
- New Platform.gd autoload: is_ios_safari() detects iPhone/iPad Safari via JavaScriptBridge UA check (no Chrome/CriOS), gating all iOS memory paths - ModelCache.release_model(url, etag): evicts a model from in-memory cache on iOS Safari when a unit leaves the board; no-op on other platforms so disk cache is always preserved for fast reload - unit_mesh_builder: stores resolved model URL+ETag per unit (_unit_model_urls, _unit_model_etags); calls ModelCache.release_model in the to_remove loop so PackedScene refs are freed as soon as the unit is pooled or freed - ContentCache.get_model_url_for_definition: stub for looking up a card's Model3D CDN URL without a loaded unit dict (foundation for future eviction paths) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -29,6 +29,7 @@ Settings="*res://autoloads/Settings.gd"
|
||||
Game="*res://autoloads/Game.gd"
|
||||
CustomLobby="*res://autoloads/CustomLobby.gd"
|
||||
ModelCache="*res://autoloads/ModelCache.gd"
|
||||
Platform="*res://autoloads/Platform.gd"
|
||||
Music="*res://autoloads/Music.gd"
|
||||
SFX="*res://autoloads/SFX.gd"
|
||||
HighlightConfig="*res://autoloads/HighlightConfig.gd"
|
||||
|
||||
Reference in New Issue
Block a user