Neo.Merge is a generic pure C# merge engine for connected groups. It is not tied to Unity scenes, grids, inventory slots, or any specific game.
Use it when a mechanic needs to find equivalent connected items, choose the result item, compute a new value, clear the rest, and optionally continue cascading from the result.
MergeRequest<TItem, TValue>defines items, seeds, value access, neighbors, match rules, result selection, merged value, cascade mode,MaxCascadeIterations, and mutate/dry-run mode.MergeResolver.Resolve(request)returnsMergeResult<TItem, TValue>.MergeResultcontains resolved groups, changed items, andCascadeLimitReached(set when a cascade hit the safety limit).- For grids,
GridMergeRequest.Increment(...)is a ready-made preset for the common "merge equal content into content+step at the seed, cascade from result" rule.
- Grid games: use
Neo.GridSystem.Merge.GridMergeResolverto adaptFieldGeneratorcells. - Dice games: use
Neo.GridSystem.Dice.DiceBoardServicefor dice placement and dice-specific merge rules. - Custom systems: pass any graph/list/inventory nodes as
TItemand provide a neighbor callback.