Thanks again and again for your answers.
And sorry for my poor English.
<blockquote>gamingislove said: why not just use a combatant?</blockquote>
The reason is that we want to be able to carry that Combatant(e.g.dish,pot,pizza dough,etc) equipped by Player Combatant and Equipment Combatant (e.g. Counter, GasStove, Oven, etc.) Combatant.
The player can equip them in his right hand, left hand or (depending on the item)both hands, and since the EquipmentViewer is available, we thought it would be easy to handle the equipment.
I thought it would be too much work if I only used the Combatant, because I would have to create the mounts and the management part myself.
<blockquote>gamingislove said: If you store the combatant into a global selected data it'll be kept alive there (but not in save games). You can later e.g. spawn it again via the selected data.Via scripting, if you keep the reference somewhere (e.g. a component that isn't destroyed/removed) it'll also be kept alive there.</blockquote>
Yes, I know the Select Combatant node.
Use it as a source,
CombatantComponent.Combatant = selectedCombatant
but changes to another new instance in subsequent frames(dish A has changed to dish B. The item equipped by dish A becomes empty.).
Can this be avoided? The question is.
Spawning is not convenient because it creates a new game object.
My question is to RestoreCombatant to an existing game object instead of Spawn.
In short, I would like to know how to do the following from a node and from a script, respectively.
gameObject.AddCombatant(Combatant cachedCombatant)
AddCombatant node is close to it, but you can't choose SelectedData as the source.