serialization-safety
CommunityPrevent Unity serialization pitfalls.
Software Engineering#csharp#unity#serialization#serializefield#formerlyserializedas#serializereference
AuthorXeldarAlz
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Unity's serialization system can silently reset values when renaming fields, using incorrect null checks, or misusing SerializeField/SerializeReference, leading to data loss and hard-to-trace bugs.
Core Features & Use Cases
- FormerlySerializedAs on renames to preserve values across refactors.
- Correct Unity null checks to detect destroyed objects and avoid null-reference crashes.
- SerializeField for private fields to maintain encapsulation while preserving serialization.
- SerializeReference for polymorphic serialization to handle derived types.
- Depth awareness and safeguards to prevent serialization depth-related issues.
Quick Start
Audit your Unity codebase and apply the above rules to prevent silent data loss.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: serialization-safety Download link: https://github.com/XeldarAlz/KlondikeSolitaire/archive/main.zip#serialization-safety Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.