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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Editor tool suite

Discussion in 'Scripting' started by cmannett85, Oct 15, 2015.

  1. cmannett85

    cmannett85

    Joined:
    Oct 14, 2015
    Posts:
    6
    I'm planning on creating a tool suite that will consist of a couple of components, a new editor window, and a couple of native libraries. I have a pretty good idea of how to achieve these individually, however what I am stuck on is how to package them.

    I know the folder structures where I should put the files, but these are per-project. I would like my tool suite to belong to the editor and therefore be available to all projects - including existing ones.

    How can I achieve this? Or are pan-project plugins/scripts frowned upon in Unity?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,797
    You sound serious, so I will assume you are using source control.

    If you are using Mercurial you can use subrepos to share a portion of the project across Unity projects.

    If you are using git you can use submodules to do essentially the same thing.

    With Perforce you can specify individual client views that include shared portions of code.

    SVN's system (I believe) is called "externals" but I've not used that in a while.

    I'm sure any other modern source control system you might be using would also support shared code in some form or another.

    If you have not yet set up source control, stop what you are doing and go do so now, and make sure you read about how to configure Unity to "play nice" with source control systems.
     
    StarManta likes this.
  3. cmannett85

    cmannett85

    Joined:
    Oct 14, 2015
    Posts:
    6
    So I can't package my tool suite for the editor, I have to provide a copy for every project. That's pretty poor.

    Out of curiosity, does anyone know why Unity would have chosen to do this?
     
  4. ArthurT

    ArthurT

    Joined:
    Oct 26, 2014
    Posts:
    75
    If you are looking for a modular way to provide your tool suite for the editor that would work without copying them over to any projects, I'd suggest you to look into the modules platform.

    Depending on your situation, but there are a few examples out there that work well with this system, such as UIToolbox.
    https://bitbucket.org/Zeroto/uitoolbox

    The only caveat is that I know of, is that it has to be compiled as a DLL for any changes to the code.
     
    ThermalFusion likes this.
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,998
    You can also place your extension.unitypackage into Unity\Editor\Standard Assets\ - folder, so its directly available from the Import/Package.. but it gets erased every time you install unity..