tools-unity-memorypack

Serialize Unity C# data with zero-allocation MemoryPack to minimize GC pressure.

6|1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/tjboudreaux/cc-plugin-unity-gamedev --skill tools-unity-memorypack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tools-unity-memorypack
Source: https://github.com/tjboudreaux/cc-plugin-unity-gamedev/tree/main/skills/tools-unity-memorypack
Command: npx skills add https://github.com/tjboudreaux/cc-plugin-unity-gamedev --skill tools-unity-memorypack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MemoryPack provides a zero-allocation, high-performance serialization solution for Unity, reducing GC pressure and improving runtime efficiency for game data, network messages, and asset data.

Core Features & Use Cases

  • Zero-allocation serialization for Unity objects to minimize garbage collection during tight game loops.
  • Custom formatters & versioning to support Unity type extensions and forward/backward compatibility.
  • Polymorphic and union-based serialization for flexible network messages and runtime data structures.
  • Practical use cases include saving player state, syncing gameplay data over the network, and caching asset metadata.

Quick Start

Define a MemoryPackable class and serialize it with MemoryPackSerializer to begin.

Frequently Asked Questions about tools-unity-memorypack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce garbage collection pressure during Unity serialization?

Zero-allocation serialization minimizes garbage collection pressure in Unity by using MemoryPackable annotations and MemoryPackSerializer APIs to serialize game data without allocating managed memory.

Can I use polymorphic serialization for Unity network messages?

Polymorphic and union-based serialization supports flexible network messages and runtime data structures in Unity, allowing derived types to be serialized through shared base class interfaces.

How do I maintain backward compatibility when versioning serialized Unity save data?

Version-tolerant schemas maintain forward and backward compatibility for Unity save data by applying custom formatters and MemoryPackable annotations to manage evolving data structures.

What's the best way to serialize player state in Unity without triggering GC spikes?

Zero-allocation binary serialization handles player state by processing MemoryPackable classes through MemoryPackSerializer, bypassing managed allocations to eliminate GC spikes during tight game loops.

Does MemoryPack work with custom formatters for Unity type extensions?

Custom formatters support Unity type extensions by defining specialized serialization logic for native Unity objects, enabling MemoryPack to process types outside its default supported scope.

When should I avoid zero-allocation binary serialization in Unity?

Zero-allocation binary serialization may be unsuitable when human-readable data formats are required or when complex object graphs need deep nesting beyond practical custom formatter implementations.