Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

[RELEASED FOR FREE] Projeny: Unity Project and Package Manager

Discussion in 'Assets and Asset Store' started by eventropy, Jan 9, 2016.

  1. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    The purpose of Projeny is to allow your Unity3D project to easily scale in size without heavily impacting development time.

    Projeny allows you to:

    • Share any Unity assets (code, scenes, prefabs, etc.) across multiple different Unity projects without copy and pasting
    • Instantly switch between platforms
    • Easily upgrade or downgrade installed asset store packages
    • Optimize compile time of your project by getting Unity to only recompile the code that changes most often
    • Split up your project into discrete packages, so that you can manage the dependencies between each, instead of having one giant Unity project of inter-related files
    • Declare dependencies between packages, so that you always get the packages that you need without needing to hunt down missing libraries or broken links
    • Generate a more intelligent Visual Studio solution than the Unity default, using package dependencies to create csproj dependencies
    For more details on how it achieves these features please see the documentation page here:
    https://github.com/modesttree/projeny

    Any feedback on it is welcome!
     
    Mauri, nirvanajie, doq and 9 others like this.
  2. UCh

    UCh

    Joined:
    Nov 18, 2012
    Posts:
    29
    This solve a lot of the problems that I'm trying to solve myself. I have a couple of questions:

    1) Apparently is not working on OSX? What do you need to make it happen? What can I do to make it happen?
    2) Do you plan / are interested in support artifact repositories (Nuggets or unityPackages in Nexus, for example)?

    Cheers and thank you for your hard work (Zenject is my top option for DI in Unity BTW)
     
  3. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    1) Yes, I was hoping someone could help me with that as I don't currently have access to an OSX machine. It's written in python so a lot of it will transfer over but there's some windows-specific stuff happening to create the directory links (and likely other places that will need tweaks)

    2) The focus of this first release has been more about managing multiple unity projects once you already have an existing set of local packages. The way that you obtain these local packages is very simple right now - which just involves choosing a unitypackage from some number of sources such as a local folder, a network share, the Asset Store cache on your local hard drive, etc. That unitypackage then gets converted to a local package with zero dependencies.

    BUT I do think it would be very interesting to consider integration with a repository manager like Nexus/Nuget/Bower for future versions. Maybe eventually you could install plugins for Projeny that allow you to pull packages from one of these remote repository managers, and then the plugin would convert these remote packages to a collection of local packages that Projeny could then manage like it does now. Then by storing where the local package was installed from you could do things like upgrades etc. Again though, I haven't really given these kinds of features very much thought just yet.
     
  4. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Updated this to version 0.3 with features:
    • Better error handling and error output
    • Added ability to share project settings folders across multiple projects
    • Added support for multiple packages directories. This is particularly useful to define project-specific packages.
     
  5. seldom

    seldom

    Joined:
    Dec 4, 2013
    Posts:
    111
    Sounds great! There is something like nuget for unity, called UPM, but it looks abandoned.
     
  6. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Thanks. Yeah I've heard of UPM, but Projeny is quite different. It actually doesn't do much in the way of remote packages yet. See here for an ongoing discussion about this
     
  7. ephemeral-life

    ephemeral-life

    Joined:
    Sep 12, 2015
    Posts:
    488
    Thanks for the tool, but I can't get it to work. When I try to create a new project I get the following error:

     
  8. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Oh, hmm. Can you send me the PrjLog.txt file at the root of the samples directory after you encounter that error?
     
  9. ephemeral-life

    ephemeral-life

    Joined:
    Sep 12, 2015
    Posts:
    488
    PM:d.
     
  10. ephemeral-life

    ephemeral-life

    Joined:
    Sep 12, 2015
    Posts:
    488
    Thanks for all the awesome support and great product, all for free!
     
  11. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    No problem, glad you got it working :)
     
  12. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    61
    Wow. This project is amazing.

    I struggled with this for a long time. I hate writing ugly code. I am a big fan of Zenject and have been using it to keep things clean, but I was never satisfied with project structure.

    I started splitting my code into external projects and compiling to DLLs. Unfortunately, I could never get it to play well with external assets, like code from the Asset Store. For example, I really wanted to code up some custom nodes for NodeCanvas. But to do that, I had to reference the code in the Unity project. I tried so many different ways of doing it, but none of them made it easy.

    So this Projeny project is exactly what I was hoping for. Combining this with Zenject, and I have an awesome way to organize my project in a modular way. Thank you for your work on this. I will look for ways to contribute back to it as I use it.

    I hope to see this project get more attention from the community. Sadly, I think the concept of external code projects and modular packages is lost on a lot of Unity developers.
     
  13. sindrijo_

    sindrijo_

    Joined:
    Aug 15, 2016
    Posts:
    6
    I work in a medium sized company that develops and maintains about 35 Unity apps on 2-5 platforms each... and that number is growing, fast. We have been looking at ways to better manage our unity projects/assets and core code/assets and this looks very promising after a quick glance at the read-me on the GitHub page...

    Needless to say I am interested in helping you out with this project! :D
    (I also have access to OSX machines, also in the near future I am looking at building/setting up a CI build server and possibly basing it on Buildbot/Katana but a.t.m. I have some other more pressing deadlines...)
     
  14. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Yeah, if you have 35 Unity projects and a bunch of platforms and want to share stuff between them I think you'd like this :)

    I would love to get some help on it - especially for OSX. I don't think there's that much work required to support it but I just haven't had time to really devote to Projeny besides just the occasional bug fix.

    It should be no problem to get it working with a CI build server.
     
  15. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    I'm looking at this. Installed it and created the empty Projeny project folder "prj -cc" and now how do I begin migrating a project over? I've let one project get entirely too bloated, and it would be nice to separate things out.

    PS after running the "prj -cc" command, the docs suggest to "create a new project" but that requires opening Unity. Do I create an empty project in the UnityProjects folder?
     
  16. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    To create a new project, the instructions could use a tweak

    Method 2 - Command Line

    • Enter command prompt / powershell at the same directory where your Projeny.yaml file is
    • Execute prj --project MyNewProject --createProject (or the shortened form prj -p MyNewProject -cpr)
    • Done. You can now open [ProjectName]-Windows directory in Unity.
    • (optional) Add a ProjenyProject.yaml file to your new project folder. See here for details.
    If you don't open the -Windows, the natural thing to do is open the parent directory, and then you get an Assets folder there and don't see Projeny on the menu.
     
  17. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Thanks - I've added your suggestion to the read me.
     
  18. MapRG

    MapRG

    Joined:
    Jan 19, 2016
    Posts:
    6
    This thing is awesome. I'm hooked. 77 projects in my solution and counting (no, really, I need them all separate). Not really much to want from this, it's great as it is. I just hope it will always stay compatible with unity. I'm learning how to use solution folders now for obvious reasons. One question: how can I add to the same folder projects with very different names?

    This thing should be more popular than it is. Consider making the initial setup easier and I think people will swarm to it.
     
  19. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    I intend to continue maintaining it for future versions of Unity. Even if it doesn't gain traction. It is invaluable to our team so I'm happy to pass on fixes to anyone else that benefits from it. I need to port it to mac - I think that is preventing at least some people from using it.

    To add multiple projects to the same solution folder, you need to write a complex regex. For example, here, the Build and Debugging projects are in the same folder:

    Code (csharp):
    1.  
    2. SolutionFolders:
    3. -     Uncategorized: /^(AssetsFolder|PluginsFolder).*
    4. -     Framework: /^(Build|Debugging|Util).*
    5. -     etc...
    6. -     Other: /.*
    7.  
     
  20. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Trouble getting multiple releases. Instead my release gets updated.

    I updated an asset, via the Asset Store window, canceled on Import, hit refresh under Releases, and it didn't show up as a separate release, but updated the previous release. I thought it wasn't supposed to do that.
     
  21. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    That's by design. It should definitely have warned you before updating the package though with the newer release.

    Projeny does not support having multiple versions of the same package. If you want multiple versions, you have to name the package something else. Personally I think this is a good thing to avoid version hell and the diamond dependency problem, etc.
     
  22. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Then why does it say it does that in the docs. In the section
    Managing Asset Store Assets / Releases

    The example shows: "This file is also what Projeny uses to detect when you are upgrading or downgrading a package. For example, if I now drag in Asset Store Tools again, but this time I choose version "4.0.5", you will get the following popup"
     
  23. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    The list of releases in the far left of the Package Manager gui does display multiple different versions. But, there can only be one version in your packages folders. So whenever you drag a different version from releases to packages, it will always overwrite whatever package for that release you already have installed. It will also display a popup before doing this and show you the version you are upgrading/downgrading to
     
  24. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    So how do you update the packages on the left, so that there are multiple versions. As I said, I updated one, and it got changed to the new version. I wasn't even using that package in that project.
     
  25. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
    Hi, good to know that something like that exist :) thx for this work @eventropy
    I tried your install process using last binary release.
    At the end I got this message :


    -python 3.5 is ok
    -pyyaml is ok
    -extensions are ok too
    Someone already met that issue ?
    Thx for help.
     
  26. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    I haven't seen that error before. Can you try running from source instead of from exe? In the installation there should be a section describing how to run from source
     
  27. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    I'm not sure what you mean. When you say packages on the left, are you referring to the releases list?
     
  28. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
    Ok that works from the sources :)
    Thx.
     
  29. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
    Hi again !
    I'm following your README to test all these useful features.
    And now in the compile time opt chapter I'm facing with a fatal error that close Unity when click on "update directories" after drag and drop packages into Plugins.


    But when I reopen the project Assets and Plugins folder are well organised.
     
  30. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
    Hello !
    I have another question.
    My own working folder hierarchy is organised like this :
    01-qt_project
    src
    bin
    doc
    02-unity_project
    src
    bin
    doc
    03-web_project
    src
    bin
    doc
    04-unity_project
    src
    bin
    doc
    etc...

    May Projeny work with this kind of hierarchy ?
    Or I have to put all my unity projects in the same folder as in your demo projects.
    I precise that src, bin, doc folders are children folders and project itself is in src.
     
    Last edited: Feb 8, 2017
  31. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    I thought I was quoting you, since you said "left" as well in a previous post, anyway, here's your screenshot,
    On the left there are two versions for Asset Store Tools, Best HTTP (Pro Edition) and maybe others.

    Here's a quote from the document on GitHub, Every time you install a release, Projeny adds a file named ProjenyInstall.yaml to the new package folder. This file contains information about where the package came from, what version it is, etc. This file is how Projeny is able to recognize which packages have a corresponding release.

    This says you can have multiple versions of a package. How do I update my release (on the left) so that it shows up as separate versions there? In my test, via the Asset Store window, I updated a package, and the version number changed on the left to show the updated version, instead of making another line entry with a different version number.
     
  32. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Ok I think I see what you're asking now. You're asking how you can retain older versions of the different releases on the left. I was confused since when I think of 'packages' I think of the local folders that you have installed and not the 'releases' which come from asset store. You can't have multiple versions of the same package, but you can have multiple versions of the same release. Hopefully that makes sense.

    The list of releases on the left are simply taken from the asset store cache on your machine. So what I'm guessing is happening is that when you update a release via the asset store, it deletes the old version of the release, which is why it doesn't show up in the release list within the projeny package gui anymore.

    So if you want to retain older versions of the package, you would need to store them manually yourself. The documentation should include some information on creating your own releases directory. So one way to do it would be to open up your asset store cache (for ex `C:\Users\YourUserName\AppData\Roaming\Unity\Asset Store-5.x`) then copy the unitypackage files for the releases you want to save into another directory, and then add a new release source for that directory to your projeny config files (see docs for details)
     
  33. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    I submitted a potential fix for this with version 0.3.7. Can you try updating and see if it still happens?

    Yes, you should be able to adjust projeny to work with different folder structures by modifying variables in the config files.
     
  34. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    What do I do with the error, "Projeny validation failed." ?
     
  35. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    That means that you have files/directories that are not inside a package. It should list the directories in question as part of the error message. The reason it complains about this is that in most cases these files will not be saved in source control so you could lose data if you don't fix the error
     
  36. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Before I put this as an issue on GitHub, I'd like some feedback. I'm trying to use the Apex Path & Apex Utility AI assets. They share some common functionality. See this Apex forum post for the complete discussion I encountered with them. We've determined it is a Projeny issue, or my issue in using Projeny.

    Basically, I'll reiterate. Because of the way Projeny installs assets, it complains about assets getting installed to the same folder.

    Both Apex Path & Apex Utility AI want to have the same root Apex folder. Projeny doesn't permit this. So I rename the folder after it installs one, and so the next also gets a new name.

    The problem is that Projeny when the now separate Packages are added to a project, share DLL's and other things, have those items in duplicate (one in each package).

    Here's an error that I first encountered. Because both shared DLL's are in both folders, they have duplication. On a clean project (without Projeny), I can install both assets without a problem. Unity detects the duplicate items and doesn't install them.

    error CS1704: An assembly with the same name `ApexShared’ has already been imported. Consider removing one of the references or sign the assembly
    Assets/Plugins/Apex Utility AI 1.0.5/Apex Binaries/ApexShared.dll (Location of the symbol related to previous error)
    Assets/Plugins/Apex Path 2.4.5/Apex Binaries/ApexShared.dll (Location of the symbol related to previous error)
     
    Last edited: Feb 15, 2017
  37. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    You need to manually tweak these apex packages yourself to be compatible with Projeny. Some packages from asset store will need some tweaking.

    One solution would be to just have Apex as a single package rather than splitting it up at all. But I guess you might not want to always import the entire thing.

    Another solution would be to fully split up Apex into distinct packages yourself. All the shared dependencies like DLLs etc. should be in another package which is dependend on (via ProjenyPackage.yaml) by the other apex packages. It sounds like you're saying you created multiple Apex packages with duplicate dlls in them instead of doing this.
     
  38. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    I think I like your latter approach, if what you are saying is to create a 3rd package on which the other two depend. That way they both have access to the same files without duplication.
     
    eventropy likes this.
  39. dugsteen

    dugsteen

    Joined:
    Dec 9, 2015
    Posts:
    5
    This is a fantastic tool, even at its very early stages. Thank you!
    One thing I've noticed, though: If I use a custom solution and your batch file for opening Visual Studio, then I don't get the "Attach to Unity" debugging option that Visual Studio Tools for Unity would normally provide. I would prefer to use the custom solution, but I miss that simple button! Any suggestions?
     
  40. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Isn't there still an option under Debug -> Attach Unity Debugger ?
     
  41. dugsteen

    dugsteen

    Joined:
    Dec 9, 2015
    Posts:
    5
    Well, don't I feel foolish. I tried "Attach to process..." but didn't manage to see that in the same menu. Yes, that works. Thanks!!
     
  42. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    Is there a way to constrain which platforms a project can open? I have a package (Terrain editor) that only works on Windows, but its byproducts (Terrain) I want to use on Android. So I've created an editor project for windows and a terrain project for Android. But to switch between projects I want to avoid having to create unnecessary platforms. If I'm in the terrain project in Android, and I want to switch to the editor project I have to switch to the windows platform first. I want to avoid having accidentally having unity process a bunch of assets for a platform I'm not using. Also, I'm curious where does unity place processed assets? I mean how does unity know that an asset has been processed for a platform?

    I was looking into the scripts, and I was wondering if I could read the ProjenyProject.yaml for the base projects and modify the projeny menus so when switching projects a submenu would show up showing which platforms already exist and what will be created or are excluded from creation.

    Btw, Projeny is a lifesaver! Thanks!
     
  43. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    I've been looking through the files, and it seems like this change would require changing how Plugins/Projeny/Editor/ProjenyChangeProjectMenu.cs is generated. Maybe something could be added to PrjHelper.ChangeProject to call prj to regenerate the ChangeProject MenuItems?
     
  44. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
     
  45. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    I'm having an issue with one of my asset store packages. When I update directories for RealtimeCSG I an error message:

    Code (CSharp):
    1. PrjCommandException: Error occurred during 'Updating custom solution': Unable to resolve variable '1.344' when expanding 'C:\Users\mugen\Documents\dev\unity\packageTests\plattest\UnityProjects\Main\Main-Windows\Assets\Plugins\RealtimeCSG\Editor\External\RealtimeCSG[1.344].bundle'
    2.  
    3. Projeny.Internal.PrjCommandHandler+<ProcessPrjCommand>d__3.MoveNext ()
    4. Projeny.Internal.CoRoutine.Pump ()
    5. Rethrow as CoRoutineException: Coroutine Object Trace: PmProjectViewHandler -> PrjCommandHandler
    6. Projeny.Internal.CoRoutine.Pump ()
    7. Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
    8. Rethrow as AsyncOperationException: Error occurred during async operation
    9. Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
    10. Projeny.Internal.AsyncProcessor.Tick ()
    11. Projeny.Internal.PmCompositionRoot.Update ()
    12. Projeny.Internal.PmWindow.Update ()
    13. UnityEngine.Debug:LogException(Exception)
    14. Projeny.Internal.Log:ErrorException(Exception)
    15. Projeny.Internal.PmWindow:OnErrorOccurred(Exception)
    16. Projeny.Internal.PmWindow:Update()
    17. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    Looks like the path needs to be escaped before processing.
     
  46. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    I've a new laptop. What's the right way to do project sharing? Is it SVN repos?
     
  47. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Hi. Glad to hear that you are finding Projeny useful! I can see how these features you're talking about would be useful - can you create github issues for them so we can consider them in the future? https://github.com/modesttree/Projeny
     
  48. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Yep, this looks like a bug where Projeny has issues supporting square brackets in package names. I'll take a peek at this issue. Can you create a github issue for it also?
     
  49. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    Projeny works with any source control. You just have to make sure to ignore the right directories though - see docs for details (search "source control")
     
  50. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    248
    @doq I think I fixed the issue with paths that have square brackets. Can you try updating from source? If it works I'll create a exe release