Question by
Chorizosss · Apr 09, 2019 at 11:21 AM ·
texturedestroyed
Unable to change texture of a new object having the same name as an old one.
Hello everybody,
In my code ( in void start of my camera ), i generate alot of tiles and after i class them and change some of them.
Sample : The tile 125 must be replaced by another one. So i keep her name in an array, detroy the the tile using the destroy command and place the new one in the same place, giving it the same name than the old tile. So the tile is now a slope but always with the "125" name.
The trouble is, when i want to texture all the tiles in this array, the "new ones" are all passed. Like the system still want to texture the destroyed ones and don't find the new ones.
I use the command "GameObject.Find" to find the tile.
Someone have an idea ?
Thanks in advance for everything !
Comment