How to change the name of a gameObject

So i’m learning about coding just now and I am watching this tutorial but the tutorial is kinda old so in the tutorial it show that you should write gameObject.name = “The name of the thing” And I don’t know how to do it. Im using Unity and Visual Studio Code.

What part are you getting stuck on? That code is fine and works in all unity versions

Please use the dedicated forums provided, in this case the Scripting forum or maybe better still, the Getting Started forum.

Note that the tag is “2d physics”. This isn’t related to 2D nor 2D physics.

I’ll move your post for you.