Studio: read and write sub-asset Addressables keys, warn on stale values
Ruling S (2026-09-17): a stored [CultInspectorAssetGuid] value is the Addressables key form itself, the bare GUID for a main asset or "guid[subAssetName]" for a picked sub-asset (one sprite of a sheet, say) - the same shape AssetReference keeps and Addressables.LoadAssetAsync<T> accepts. CultAssetGuidKey (engine-free, GameCult.Caching) pins the parse/format rule with unit tests (bare guid, guid[name], names with brackets/spaces, malformed input), so headless checks can share it without touching Unity. The Studio drawer's AssetGuid branch now: resolves either key form on read; refuses to store a built-in resource's GUID (it has no Addressables entry) and logs why instead of silently writing nothing; shows a warning next to a stored value that fails to parse or resolve instead of drawing it as an ordinary empty field, and never rewrites that stale value on its own. Rebuilt GameCult.Caching/GameCult.Caching.MessagePack plugin DLLs (scripts/build-unity-package.ps1 -UpdateTemplate) since the new type ships in GameCult.Caching. Compiled CultCacheStudioDrawers.cs and CultCacheStudioWindow.cs against Unity 6000.3.24f1's editor reference set plus these plugins in a scratch csproj (removed after): 0 errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
0155ba8cca
commit
1e398e0116
9 changed files with 177 additions and 10 deletions
|
|
@ -162,8 +162,13 @@ public sealed class ItemData
|
|||
- `CultInspectorTextArea`
|
||||
- `CultInspectorRange`
|
||||
- `CultInspectorAssetGuid` (a string member holding an engine asset's stable
|
||||
identity, in Unity the `.meta` GUID; optional engine asset `Type`, named by
|
||||
the consumer; the Studio uses it when it is a `UnityEngine.Object` type)
|
||||
identity: in Unity, the `.meta` GUID for a main asset, or `guid[subAssetName]`
|
||||
when a sub-asset such as one sprite of a sheet is picked — the same key form
|
||||
`AssetReference` keeps and `Addressables.LoadAssetAsync<T>` accepts; optional
|
||||
engine asset `Type`, named by the consumer; the Studio uses it when it is a
|
||||
`UnityEngine.Object` type, refuses to store a built-in resource's GUID since
|
||||
it has no Addressables entry, and warns rather than silently clearing a
|
||||
stored value that no longer resolves)
|
||||
- `CultInspectorDrawer` (on drawer classes)
|
||||
|
||||
CultMesh collaboration should feed the same CultCache mutation surface rather
|
||||
|
|
|
|||
Loading…
Reference in a new issue