generateUniqueObjectName(name) → {string}
Generate an object name from the given base name so that it's unique for the
current scene. The result is the base name with an optional number appended
to it (e.g. "name", "name2", "name3", "name4", ...). The number is
incremented until the result becomes a unique object name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The base name. |
Returns:
New unique object name.
- Type
- string