A collection of production-ready Unity game systems showcasing clean architecture, performance optimization, and modern C# patterns.
This repository contains reusable game systems I've developed over the years for various Unity projects
Production-ready save/load system with data-first loading architecture
- Multi-scope persistence (Global/Level)
- Subsystem organization
- Auto-save coordination
- Transaction-based saves
Flexible transaction-based inventory with operations, modifiers, and constraints
- Item definitions & instances
- Composable operations
- Transaction atomicity
- Constraint validation
- Event batching
🖼️ UI Framework
Runtime UI builder with component-based architecture that extends Unity's IMGUI system
- Resource management
- Layout system
- Lifecycle management
🛠️ Utilities
Common utilities and extensions
- Math utilities
- Debug wrappers
- Serialization (SimLang format)
- Extension methods
Required:
- UniTask (Cysharp.Threading.Tasks): Used extensively in the SaveSystem for efficient async/await operations. The SaveSystem will not compile without it.
- Installation: Add via Unity Package Manager using git URL:
https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask
- Installation: Add via Unity Package Manager using git URL:
Optional:
- Odin Inspector (Sirenix.OdinInspector): Provides enhanced editor inspectors and serialization. Used primarily in editor scripts.
- Installation: Available on the Unity Asset Store
- If not installed, remove
#if ODIN_INSPECTORpreprocessor blocks or define symbols
Each system is documented in its respective README with:
- Architecture overview
- Usage examples
- Performance characteristics
- Design decisions
- API reference
Start with any system based on your needs - they're designed to work independently or together.
// Auto-loads global data on init
await SaveManager._Instance.InitAsync();
// Save with dirty tracking
MarkDirty();
await SaveManager._Instance.SaveDirtyScopeAsync(SaveScope.Global);// Atomic transaction
var transaction = new InventoryTransaction();
transaction.AddOperation(new SubtractValueOperation(ItemIDs.GOLD, 100));
transaction.AddOperation(new AddValueOperation(ItemIDs.SWORD, 1));
inventory.ExecuteTransaction(transaction);// Cached component access - no GetComponent calls
public class MyComponent : MonoBehaviourHeavy
{
void Update()
{
_Transform.position += Vector3.forward * Time.deltaTime;
_Rigidbody.AddForce(Vector3.up);
}
}MIT License - see LICENSE file for details.
These systems are provided as portfolio samples demonstrating production-quality Unity development. Feel free to use, modify, and learn from this code.