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. Dismiss Notice

How do I Edit a Script?

Discussion in 'Getting Started' started by Barron_Waltz, Jan 1, 2021.

  1. Barron_Waltz

    Barron_Waltz

    Joined:
    Jan 1, 2021
    Posts:
    2
    I know how to make a script, and I've been trying to follow the tutorials, but Unity won't let me edit it. Is there a separate program that I need? I've looked everywhere and I couldn't find one.
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    When installing Unity, one of the options is to install Visual Studio 2019 Community Edition as well.
    VS is the default code editor that Unity supports, but there are others as well.

    You can download VS Community separately from here:
    https://visualstudio.microsoft.com/
     
    Joe-Censored and Barron_Waltz like this.
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,514
    What do you mean by this? If you're referring to the text field in the Inspector being read only then that's because it's just a preview, because good code editing tools are quite complex.

    Yes. As @Vryken said, Visual Studio is installed with Unity by default, but it can also use other code editors. But you don't have to open that editor manually. Double-click on your script file in the Project panel and Unity will open the appropriate editor for you.
     
  4. Barron_Waltz

    Barron_Waltz

    Joined:
    Jan 1, 2021
    Posts:
    2
    Thank you for your help!
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Technically cs files are just text files. So you could use plain old Windows Notepad, though it would be a terrible experience. Use VS unless you have a specific reason to use something else.