Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Advanced C# Templates: Easily create new Scripts and Templates (live on Asset Store)

Discussion in 'Assets and Asset Store' started by azeitler, Nov 17, 2011.

  1. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162


    This Editor Extension allows you to create new C# scripts easily and quickly – based on flexible, multi-file templates.
    The new scripts will automatically placed in the folder you selected in the Project View.
    The Extension installs to the Menu in 'Assets/Create/C# Advanced Templates...'.

    The following templates are included:

    • MonoBehavior: standard C# script as provided by Unity 3D
    • MonoBehavior with Inspector: creates a script for a new MonoBehavior-based Class and at the same time creates a custom inspector for it in the Editor-subfolder.
    • MonoBehavior with Inspector and Tools: as above but will additionally create a static class for Editor-accessible methods (MenuItem) for tools and other stuff you might need.
    • Editor Inspector: creates a new custom inspector for the specified type and puts it into an Editor-subfolder
    • Editor Inspector and Tools: creates a new custom inspector and a tool class for editor-only methods for the specified type and puts it into an Editor-subfolder
    • Editor Window: creates a new window for the editor
    • Scriptable Wizard: creates a new wizard
    • Scriptable Object: creates a script for a new behavior not attachable to a GameObject
    • Editor MonoBehavior: creates a standard MonoBehavior that is wrapped in a '#if UNITY_EDITOR' statement thereby making it Editor-only, it will not add overhead code for release/production

    These templates work with MonoDevelop but can also used with Visual Studio.

    The templates follow the Visual Studio 2008/10 format. You can easily add your own templates. Just pick any tutorial on how to create templates for Visual Studio.

    Available here on the Asset Store:

    http://u3d.as/content/andreas-zeitler/advanced-c-templates


    This is a huge time saver.
    Feedback welcome.
     
  2. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    This looks great. I'm definitely getting this when I have the spare cash.
     
  3. ArenMook

    ArenMook

    Joined:
    Oct 20, 2010
    Posts:
    1,902
    Ugh. Opening bracket is on the wrong line.
     
  4. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162
    @Dabeh: thanks, mate
    @ArenMook: Sorry, wrong convention on my end. You can easily customize that, by editing the Class*.cs.txt files.
     
  5. RichBosworth

    RichBosworth

    Joined:
    May 26, 2009
    Posts:
    325
    Can I ask what's different between these and the free ones you offered earlier?
     
  6. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162
    The free ones are for Visual Studio only, have no integration with Unity (in terms of a wizard which creates the scripts for you) and don't work with MonoDevelop.