Produce a name that is unique among a set of siblings, appending a parenthesized counter (e.g. "Sword (2)") when baseName collides.
"Sword (2)"
baseName
The sibling type, which must expose a name string.
name
The desired name.
Existing items whose name values are considered taken.
A name not present among the siblings.
Error if baseName is empty.
Produce a name that is unique among a set of siblings, appending a parenthesized counter (e.g.
"Sword (2)") whenbaseNamecollides.