Open svermeulen opened 6 years ago
Hey @svermeulen! Any updates on this?
Not yet no, but I really want to do this. It would fit in perfectly with the way projeny is designed. I am hoping to have more time soon
Thank you for the quick reply! Would you mind sharing what parts would fit in about where? I would like to delve into it myself as well, but wouldn't know where to start at the moment.
I can help with this.
What I'd love to see is a hybrid where Projeny still dynamically swaps in/out packages with dependencies taken into account, but also generates .asmdef files for imported packages.
I recommend this approach: Create a .asmdef file at the root of the package folder Create a .asmdef file at the sub-Editor folder, and, importantly, from here move any other deeper Editor folders in the tree to be children of that first root Editor folder. Mirror the original directory structure for clarity. Why? Because A) Generating a separate assembly for every sub-editor-folder would defeat a lot of performance gains, and B) I've seen two Editor folders in completely different directory branches reference classes in eachother. Since you can't have circular dependencies, this seems like the way to go.
If there are no editor folders, fine, that's the end of it. If the user ever adds any, then gen the stuff above.
Another awesome feature would be to search for matching file guids in existing projeny packages when you import a new one, and weld together already-imported stuff to avoid duplication and losing references to stuff.
B) I've seen two Editor folders in completely different directory branches reference classes in eachother. Since you can't have circular dependencies, this seems like the way to go.
I second this. I've seen something very similar just a couple days back.
The problem right now is that I want to make a big change first before doing smaller changes like this one or others. The big change is that I want to port all the python to C# to simplify the implementation and also to make it cross platform. This project started as literally just a simple python script that set up directory junctions and then just grew over time from there, so the C# unity editor functionality was added later, and now it's very clunky the way the python and the C# interact
So it might be a bit pointless to do work on this bug now since any work would have to be done again after this larger refactor is completed.
My free time for projects outside of work is spent on the next version of Zenject at the moment, so I can't start on this refactor yet until that's finished. But if either of you or anyone else want to help with the C# refactor that would work
Actually, depending on how much work it is to generate those asmdef files, it might not be such a bad idea to just add it to the current python implementation. So if you want to take a look at doing that, that would work too. Since it will probably be a couple months before the refactor to c# is ready
This seems like it could be very interesting for use in Projeny:
https://blogs.unity3d.com/2017/11/22/unity-2017-3b-feature-preview-assembly-definition-files-and-transform-tool/