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

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

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

  1. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    @eventropy Thanks for the update. I tested the square brackets change, and it works.

    I forked the project a couple days ago and hacked in the Project-Platform names under the Change Project menu. I'll put in a pull request. I'm sure it could be done more cleanly, but I was futzing my way around the code base. Also I removed the Webplayer references and added in a support for Visual Studio 2017 RC.
     
  2. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    I was also thinking about having a GUI way to specify the platform when generating a new project. But that seems kinda complicated. I'll have to wrap my head around the Projeny GUI stuff later. For now I'm ok with generating a new project from the command line.

    So, I guess I can have the new project share some other project's ProjectSettings by adding ProjectSettingsPath to the ProjenyProject.yaml after creation, deleting the ProjectSettings folder of the new project, and running prj updateLinks for the new project?
     
    Last edited: Mar 2, 2017
  3. Dune2

    Dune2

    Joined:
    Sep 22, 2016
    Posts:
    38
    Ok, good to know that there is a solution. Though I have to let tortoisesvn bomb first with errors. Then I can go to the problem -Window folder and ignore it.
     
  4. laugre

    laugre

    Joined:
    Mar 4, 2016
    Posts:
    13
    I had to change my working machine. As I didn't have all my projeny global package on my git repositories,
    I just tried to copy my complete unity projeny working folder (containing UnityPackages and UnityProjects) on my new working machine (after installing projeny).
    And ran the command prj -cla --init
    That worked like a charm.
     
  5. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
  6. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Thanks for the pull request and reporting that issue. I'll hopefully take a look next week
     
  7. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    How do create a package that resides in Plugins/Android? If I create a package I can only drag it to the assets folder or plugins from the project manager, but the ProjenyConfigValidator does a check for junctions inside of plugins/android. So creating a folder inside of plugins/android logs errors.

    Update: Hmm let me check the docs. :)
     
  8. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    For those cases you would use FolderType (see docs). Feel free to create a github issue if one of the folder types you need is missing
     
  9. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    The ProjenyConfigValidator is annoying for a good reason though - if you directly add files to your project, then they won't be saved to source control. Everything should be in a directory junction somewhere
     
  10. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    Thanks for the reminder. Yeah I found FolderType in the docs. It's my first time dealing with this so basically I create a package, then create a ProjenyPackage.yaml for the that package before including it in the project.

    Update: I needed to add a project.properties file as well otherwise I get a PrjCommandException which breaks the project. Adding the file with a line like:

    Code (CSharp):
    1. target=android-18


    fixes it.
     
    Last edited: Apr 4, 2017
  11. brimon

    brimon

    Joined:
    Jun 1, 2017
    Posts:
    1
    @eventropy

    I installed projeny and downloaded the sample project. I unzipped it in C:\ProjenySamples-v0.3.7 and ran prj --init with no problems. Upon following the directions on GitHub (opening the AllMovers-Windows project, opening the scene and then opening the package manager), I get the error "ArgumentException: Illegal characters in path." Any thoughts on why this might be happening? Any other info that's necessary to figure this out ?

    EDIT: I fixed the problem, I just moved the Projeny installation folder from Program Files (x86) to just C:\ and it worked.
     
    Last edited: Jul 28, 2017
  12. plourdegui

    plourdegui

    Joined:
    Mar 24, 2017
    Posts:
    5
    I see there is a guide to learn how to setup a brand new projeny-enabled project but I could not find any guide to onboard an already-existing project and make it projenized.

    Does such guide exist?
    If not, could someone could provide assistance with such endeavor?

    I spent many hours trying to make my current project modularized and projenized but I faced the challenge of needing to recreate all the references between my scene and resources (sprites, scripts, prefabs, etc).
    I would like to know it is possible to migrate a project without having to manually set all links/references via the inspector.

    Any help is more than welcome.
    Cheers
     
  13. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Moving assets into projeny packages should not invalidate inspector references. Is it possible that somehow the meta files got deleted? That would cause references to be lost.

    As for 'projenizing' an existing project, you would just need to move the files into package directories and then set up ProjenyPackage.yaml files that include the dependencies between packages
     
    plourdegui likes this.
  14. plourdegui

    plourdegui

    Joined:
    Mar 24, 2017
    Posts:
    5
    Are there any plans to make Projeny compatible with Unity Cloud Build?
    Or, are there any strategy to make my "Projenized" project build on Cloud Build?
     
  15. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Right now I'm waiting until I have a big chunk of time and then I'm going to port all the python code to C#. At that point, it might be closer to being able to work with cloud build, I'm not exactly sure (I haven't looked into what the issue is with cloud build)
     
    plourdegui likes this.
  16. plourdegui

    plourdegui

    Joined:
    Mar 24, 2017
    Posts:
    5
    As a workaround to build on Cloud Build without conflict, I have changed the location of my UnityPackages to point a folder within the Asset package of a "PlaceHolder" project which is the one being built in the Cloud Build (zombie_idle_evolution folder).
    In projeny.yaml, I have the following PathVars entry:
    SharedUnityPackagesDir: '[ConfigDir]/Assets/UnityPackages'

    Below are images of my project structure.
    My root (Unity/GoldenCamel/zombie_idle_evolution) is the root for Cloud Build and it is a place holder project in and of its own. Other "Projenized" projects are in the UnityProjects.:
    ------------------------------------------------------------------------------ Root.png
    ------------------------------------------------------------------------------
    UnityProjects.png
    ------------------------------------------------------------------------------ Assets.png
    ------------------------------------------------------------------------------ UnityPackages.png
     
    eventropy likes this.
  17. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Hi there,

    I just downloaded and installed everything as per the installation instructions. Now while I am trying to setup the 0.3.8 demo I am getting the following error:

    Error: Could not find 'UnityProjectsDir' in PathVars. Have you set up your Projeny.yaml file?
    See PrjLog.txt for more details
    Operation completed with errors. Took 0.0 seconds.

    I have the path variable setup as per the instructions so I am not really sure what I am doing wrong. Has anyone else run into this? I didn't find anything on it in a thread search.

    PS I didn't find PrjLog.txt
     
  18. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    If you're trying to open one of the demo projects, you should see a PrjLog.txt in the Demo folder.

    If you don't see the PrjLog.txt file, I wonder if you're running prj from the wrong directory. You should be able to go into the Demo folder and run 'prj -pl win -p am -ou' for instance.
     
  19. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I was running it in the root directory, i.e. 'F:\ProgramFiles\Projeny-0.3.8\' When I run it in the Demo directory I get a second set or errors, one of which might give insight into my issue:
    Making missing directories in path 'F:\ProgramFiles\Projeny-0.3.8\Demo/UnityProjects/CubeMover/CubeMover-Windows/Assets/Plugins/Projeny/Editor/Projeny.dll'
    Failed during task: updating package directories for project CubeMover (Took 0.0 seconds, time: 15:45:37, total elapsed: 0.1 seconds)
    It would seem the addresses are in a mixture of forward slashes and backward slashes in the addressing. I am guessing it is where the errors are coming from.
    When I do it in the root I don't get a PrjLog.txt file, but the one in Demo seems to populate just fine.
    In my path I have: 'F:\ProgramFiles\Projeny-0.3.8\Source\bin'
    When I run 'prj -pl win -p am -ou' it opens the project just fine in Unity.
     
  20. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    To open a project you need to run 'prj' inside of the root folder of your projeny. Running it outside of a projeny folder will result in errors. I've never had an issue with slashes, so that's kind of weird. But maybe you can try reinitializing the projects. Inside the Demo folder run: 'prj -in', if that succeeds you can open the CubeMover project: 'prj -p cm -ou'.
     
    Last edited: Nov 13, 2017
  21. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Vanilla install or downloaded demo, both give same errors in the main project directory:

    (Using PowerShell Windows 10)

    PS F:\ProgramFiles\Projeny> prj -in

    Error: Could not find 'UnityProjectsDir' in PathVars. Have you set up your Projeny.yaml file?
    See PrjLog.txt for more details
    Operation completed with errors. Took 0.0 seconds.

    It doesn't create a log file, but when I set one up I get the following:

    Started Prj with arguments: -in
    Error: Could not find 'UnityProjectsDir' in PathVars. Have you set up your Projeny.yaml file?
    See PrjLog.txt for more details

    Traceback (most recent call last):
    File "F:\ProgramFiles\Projeny\Source\mtm\util\ScriptRunner.py", line 18, in runWrapper
    runner()
    File "F:\ProgramFiles\Projeny\Source\prj\main\PrjRunner.py", line 172, in _runInternal
    self._runPreBuild()
    File "F:\ProgramFiles\Projeny\Source\prj\main\PrjRunner.py", line 103, in _runPreBuild
    self._packageMgr.updateLinksForAllProjects()
    File "F:\ProgramFiles\Projeny\Source\prj\main\PackageManager.py", line 251, in updateLinksForAllProjects
    for projectName in self.getAllProjectNames():
    File "F:\ProgramFiles\Projeny\Source\prj\main\PackageManager.py", line 241, in getAllProjectNames
    assertThat(self._varMgr.hasKey('UnityProjectsDir'), "Could not find 'UnityProjectsDir' in PathVars. Have you set up your {0} file?", ConfigFileName)
    File "F:\ProgramFiles\Projeny\Source\mtm\util\Assert.py", line 31, in assertThat
    triggerAssert(message, *params)
    File "F:\ProgramFiles\Projeny\Source\mtm\util\Assert.py", line 11, in triggerAssert
    raise Assertion('Error: ' + message)
    mtm.util.Assert.Assertion: Error: Could not find 'UnityProjectsDir' in PathVars. Have you set up your Projeny.yaml file?

    Operation completed with errors. Took 0.0 seconds.


    I am a Perl, C#, Javascript guy, not so good at python yet, so I am not sure how to debug this, or why the conflicting addressing is even happening (or if it's even the cause for my errors). Regardless for me this is not working and I have no idea how to get it working, having followed the instructions exactly.

    -bop
     
  22. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    Unfortunately, it's confusing how things are named.
    F:\ProgramFiles\Projeny is your install directory of Projeny, capital P, but F:\ProgramFiles\Projeny\Demo is a 'projeny', lowercase p.

    So cd into the Demo folder, then run 'prj -in'. Once that completes run: 'prj -p cm -ou' to open the CubeMover project.

    Here's a video showing how to checkout the Demo, and I also create a new projeny from scratch. Be aware that you have a per projeny Projeny.yaml and a global Projeny.yaml in your home folder. I show how you can setup your global Projeny.yaml using PathVars so you can add additional package directories or move the location of package sources.
    https://streamable.com/06y2y
     
    boysenberry likes this.
  23. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Perfect, I get this now. I'll give it a go once I get the chance to take a break from the 9 to 5. Thanks, I am looking forward to using this a lot!
     
    doq likes this.
  24. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    All of the demos are working great for me!
    While following the instructions for getting my own project underway I am running into a new error during init:

    Error: Could not find match for YAML element ProjectSettingsPath

    When I update directories inside the management panels I get a similar error:

    PrjCommandException: Error occurred during 'Updating directory links': Error: Could not find match for YAML element ProjectSettingsPath

    Projeny.Internal.PrjCommandHandler+<ProcessPrjCommand>d__3.MoveNext ()
    Projeny.Internal.CoRoutine.Pump ()
    Rethrow as CoRoutineException: Coroutine Object Trace: PmProjectViewHandler -> PrjCommandHandler
    Projeny.Internal.CoRoutine.Pump ()
    Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
    Rethrow as AsyncOperationException: Error occurred during async operation
    Projeny.Internal.AsyncProcessor.AdvanceFrameAll ()
    Projeny.Internal.AsyncProcessor.Tick ()
    Projeny.Internal.PmCompositionRoot.Update ()
    Projeny.Internal.PmWindow.Update ()
    UnityEngine.Debug:LogException(Exception)
    Projeny.Internal.Log:ErrorException(Exception)
    Projeny.Internal.PmWindow:OnErrorOccurred(Exception)
    Projeny.Internal.PmWindow:Update()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    Getting closer though, hehe.
     
  25. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    I'm not familiar with what would cause that error. How did you setup your projeny exactly? You usually don't have to run init unless something has gone wrong and you want to "rebuild" a project. Creating projects in a projeny initializes them for you.
     
  26. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Hmm, I've tried it from scratch a couple times now and it's the same each time. I am following the video posted above. When I get to the point where I open the Projeny Package Manager it does it's initialization just fine. Unlike in the demo, my ProjenyPackagesDir is empty (while my Releases is populated with everything I own but the Unity Standard Assets). If I click the Update Directories button at any point I get the same error I mentioned in my last post. When I look at the package yaml files they mirror the demo, except for the aliases. I am not sure why it's giving me the errors, but It happens consistently. I can create the new package called Source as in the demo and add it to the Assets folder without an error.
    As an aside, I downloaded and unziped the Unity Assets on the site, when I do it shows up under SharedUnityPackagesDir as one package.
     
  27. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    PS I only tried init again because I was getting the errors. The errors happen when I follow your example exactly, just using prj -cpr -p EL
     
  28. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Also, I am not finding Projeny as an option in the External Tool Script Editor dropdown.
     
  29. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Not sure if it matters either, but I am using 2017.2.0f3
     
  30. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    The ProjenyPackagesDir is a directory you specify in your global Projeny.yaml. It's then referenced in your projeny's UnityProjects/ProjenyProject.yaml under PackageFolders. It allows you to create a directory of packages that can be shared between projenys. The Releases points to Unity's Asset Store packages folder under AppData/Roaming/Unity
    and you can add directories of packages to that list using the ReleaseSources/LocalFolder variables in your global Projeny.yaml. This is covered in the Projeny.yaml Reference on github.

    If you're not seeing Projeny in the Editor then the project wasn't initialized properly. If you need further help direct message me and I can help you over skype. FYI, eventropy is the original author, but I've hacked on the source a bit under "geekrelief".
     
    boysenberry likes this.
  31. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I got it all working once I put the ~/Projeny.yaml in place with values reflecting my system values.
    I also created an up to date Unity Standard Assets Package in a Projeny wide folder and have the Projeny as default VS editor integration working.

    This is really behaving well. I am glad I got through my difficulties locally thanks for all the help @doq !

    I wish I could buy you both a coffee! I am surprised this isn't in the asset store it is certainly going to be one of my most useful assets.

    Now to dig into ZenJect...
     
    doq likes this.
  32. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Glad you got it working

    We actually submitted it to asset store after writing the first version but Unity rejected it and didn't give me any reason. I was thinking that we could try submitting it again once we port the python stuff to C#
     
    boysenberry likes this.
  33. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I look forward to the update. I will help out as I am able as well, at least debugging, etc. when the time comes. Reach out if there is anything I can do to help out.