Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to change the name of a gameObject

Discussion in 'Getting Started' started by FutureDuck-, Apr 2, 2023.

  1. FutureDuck-

    FutureDuck-

    Joined:
    Apr 2, 2023
    Posts:
    2
    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.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,500
    What part are you getting stuck on? That code is fine and works in all unity versions
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,783
    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.