Unity-fejlődés és mentések
Megőrzi a Unity-leltárt, küldetéseket és feloldásokat mentés, betöltés és frissítés során. Tisztázza a visszaállítás sorrendjét és a megszakadt írások kezelését, hogy ne sérüljön a haladás.
unity-gameplay-progression-save
Nézd meg, miben segítMikor hasznos?
Akkor használd, ha menthető fejlődést készítesz, vagy meg kell akadályoznod, hogy betöltéskor tárgyak, jutalmak vagy lezárt küldetéslépések ismétlődjenek.
Miben segít neked?
- Meghatározza a megengedett tárgymozgatást és küldetéslépést, beleértve a teli hátizsákot, hiányzó tárgyat és már átadott jutalmat.
- Tudatos sorrendben állítja vissza a játékost, világot és aktív küldetéseket, hogy betöltéskor ne járjon újra jutalom vagy feloldás.
- Ellenőrzi a mentés verzióját, sérülését és hiányosságát; úgy tervezi az írást, hogy megszakításkor ne vesszen el észrevétlenül az egyetlen helyreállítható példány.
Például ezt kérheted
Adj mentési pontot egy Unity-kazamata főellenfele után. Tárold a leltárt, teljesített küldetést és nyitott kijáratot, majd kétszeri betöltéssel ellenőrizd az egyszeri jutalmat. Próbálj régi fájlverziót és megszakított írást; a sérült új fájl ne írja felül csendben az egyetlen helyreállítható haladást.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Progression and Save Restoration
Model state before persistence
Separate immutable item/quest/ability definitions from per-player runtime instances. Give persisted definitions stable identifiers independent of scene instance IDs or hierarchy paths. Identify who owns progress, when changes become durable and what a checkpoint actually restores.
- Define inventory invariants: stack limits, unique items, capacity, quantity bounds and failure behavior. A rejected operation must not partially remove or duplicate items.
- Model quests and abilities with explicit states and transition guards. Rewards, unlocks and checkpoint grants need an idempotency rule so replaying an event or restoring a save cannot grant them twice.
- Specify dependencies and restoration order: definitions, player state, scene/world state, active quests and presentation. A load should reconstruct a valid state before events trigger gameplay side effects.
- Persist plain versioned data with validation and deliberate migrations. Treat missing definitions, unknown fields, corrupt/truncated files and future versions as explicit cases. Preserve recoverable data rather than silently overwriting it.
- Use the project's platform-appropriate save location and write/replacement strategy. Keep a last-known-good copy where appropriate; a crash during writing should not destroy the only valid save.
- Distinguish a save request from a completed durable write. Handle cancellation, scene exit, concurrent requests and failures without reporting success early.
- Keep secrets and authoritative multiplayer economy state out of editable local saves. Follow existing cloud-sync/account semantics when present; don't introduce an external service by assumption.
Verification
Round-trip representative progress, empty/new-game state and old versions. Check interrupted writes, malformed data, missing content, repeated load, scene transition and reward replay. Use temporary fixture data instead of real player saves. Report the actual tested platform and restoration scenarios.
References: version-matched Unity serialization and Application.persistentDataPath. Inspect target-platform behavior before choosing a storage or atomic replacement API.
Csomagban lévő fájlok 1
SKILL.md
