Changes the key being used by a Texture to the new key provided.
The old key is removed, allowing it to be re-used.
Game Objects are linked to Textures by a reference to the Texture object, so all existing references will be retained.
name | type | description |
---|---|---|
currentKey | string |
The current string-based key of the Texture you wish to rename. |
newKey | string |
The new unique string-based key to use for the Texture. |
true
if the Texture key was successfully renamed, otherwise false
.