Coordinates & Naming Not Updating

Windows 10 / Unity Version 2021.1.26f1 DirectX11



Whenever I move a tile in play mode, the tile coordinates update and the naming convention in hierarchy remains at default. Whenever I am in edit mode, the tile coordinates are correct upon restart, but as soon as I move a tile the coordinate values do not update and then regress back to default values.

Another error that may be linked is that when a tile is selected, additional text characters can been observed shrink wrapping around the cube.

Any help would be appreciated, thanks…

Hi,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

Are there any error messages in your console when the labels are supposed to update their text?

Does each “Text” game object have got a CoordinateLabeler attached?

Thanks for the reply…

Yes, my code is identical, all game object have the script attached, I have no errors in script and no errors are appearing in the console during play. I have progressed into the course up to the point of importing assets, and the errors I am still experiencing doesn’t seem to affect the functionality of game play considering the enemy is moving correctly down the path of my choosing based on the list I formed. I still have the original bugs such as failure of updating coordinates and names, but the functionality is ok. I think it may be a compatibility issue with my version of unity and the version of textmeshpro…

This has led onto another error. I am currently working through importing assets (Castle Asset Pack) I entered prefab mode on my tile to replace cube with grass prefab, and the text mesh pro component vanished when I deleted the cube. I have successfully replaced the cube with the grass tile, and the enemy still moves correctly when in play mode, but all of my textmeshpro elements have now completely disappeared…

The TextMeshPro elements were probably on the cube you deleted.

If(Application.isPlaying) {

I don’t remember the line of code in the course but I have to say it’s been a while since I’ve done this section. If I remember right, that would make the visible data on the cube update while you’re playing and go away once play mode has finished.

Either way, later on you’re going to delete the visual coordinates so it doesn’t matter in the long run.

1 Like

Thanks for the reply, I can live without the visual coordinates, but I’ll try and fix it none the less…

1 Like

Privacy & Terms