Fusion Manager
The Fusion Manager is the component responsible for merging a set of characters into a new character.
This fusion is described in a Scriptable Object called Game Character Fusion, which is composed of the following variables:
- Characters To Fuse: A list of Shop Characters.
- Fusion Result: A Shop Character.
When the Fusion Manager finds all Characters To Fusion characters between the battlefield and the character bench, it deletes them and the Fusion Result character is instantiated. It is necessary for the Fusion Manager to have such a Game Character Fusion in its Fusion List.
The Fusion Manager can be used to create a level up effect. When a number of identical characters are found, they are eliminated and give rise to a new unit with higher stats. A simple way to achieve this effect will be shown in Level Up a Game Character.
It can also be used to create a fusion of characters. For example, if in Characters To Fusion there is a Cleric and a Warrior, the Fusion Result could be a Paladin.
To keep the equipped items of the merged characters, select the Keep Items option in the Fusion Manager Inspector. All the items of the characters will be automatically passed to the resulting character.