gecs-serialization

Installation
SKILL.md

GECS Serialization in Godot 4.3+

Persist and restore game state using GECS v9 serialization. Convert matching query results to serialized GecsData, save to disk in text (.tres) or compact binary (.res) formats, and restore entities with relationships and components intact.

Addon: GECS · version v9 · Godot 4.3+ · MIT
Related skills: gecs-core for components, gecs-queries for serialization queries.


1. Quick Start: Save & Load

# 1. Save all persistent entities
func save_game(filepath: String = "user://savegame.tres") -> bool:
	var query := ECS.world.query.with_all([C_Persistent])
	var data: GecsData = ECS.serialize(query)
	return ECS.save(data, filepath, false) # false = .tres, true = binary .res
Installs
2
First Seen
Today