Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What's the purpose of UnityEditor classes?

Discussion in 'Scripting' started by b1naryatr0phy, Mar 28, 2015.

  1. b1naryatr0phy

    b1naryatr0phy

    Joined:
    Mar 28, 2015
    Posts:
    4
    From what I've read:

    "The Editor folder name is a special name which allows your scripts access to the Unity Editor Scripting API.
    Scripts inside an Editor folder will not be included in your game's build. They are only used in the Unity Editor."


    So what's the purpose of them? Are they strictly used by folks that are, for example, developing tools for the Asset Store to be used by other developers to increase the functionality of Unity itself? Are they of any use to developers that are strictly working on commercial games, for instance?
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,513
    They're used by anyone who wants to write custom editors.

    May it be a custom inspector for a script you wrote.

    Or a propertydrawer for a specific type/attribute you set up.

    Or an editor window.

    This may be for tools that you sell in the asset store. This could be for internal usage for yourself, or your team.
     
    b1naryatr0phy likes this.
  3. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
    Or, If you find that you are doing something again and again in the editor while creating levels, etc, you can write script to automate it for you, using the Editor classes
     
    b1naryatr0phy likes this.
  4. b1naryatr0phy

    b1naryatr0phy

    Joined:
    Mar 28, 2015
    Posts:
    4
    Excellent, that's what I figured. Thank you gentlemen.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The core concept is that Unity becomes your game's specialised editor. Each game you make, customises the editor to become the perfect editor for your game. It's shocking how many people miss how important this is. You don't even need to restart the editor! As far as I know it's the only competitive all purpose game engine that allows this.

    At least that's been the case for all our titles so far and the one in dev.