SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
806 stars 165 forks source link

Submodule support #161

Open JimSimons-UH opened 3 years ago

JimSimons-UH commented 3 years ago

Basic support for the case where plugins have their own repos/are submodules.

Diffing and history tested along with basic source control operations.

This is not intended to be a comprehensive implementation but enough to get up and running with the built in visual diff tool for blueprints.

SRombauts commented 2 years ago

Thank you for the contribution :) I am not sure how many people use Content in Plugins, I would be interested into knowing the use case/workflow. I'll see if I can spend more time developing the plugin in the coming months :)

ameaninglessname commented 2 years ago

I am not using sub-module in production yet, and i was doing some horrible modifications on perforce source control module to bring the change list support using existing content browser folder structure when i was a beginneršŸ¤£.

But what i imagine about this is:

A project is divided into the main module (project repository) and many sub-modules (plugins repository)

every module could contain code and content, with the idea of GameFeature plugin, this became more true in my understanding: plugins brings more features to the project, event server as DLC. So code and content is needed.

With the LFS, could we manager these binary content files directly with git in the same repository of source code? I haven't dig into this yet. If not may be consider using another SCM tool like perforce just for content? (then mutiple SCM running at the same time is need to be supported...)

With that being said, the project consist of these :

BaseGamePlugin (Could be shared cross projects) GameFeaturePlugins (Could be shared cross projects) based on BaseGamePlugin or not ProjectSpecificPlugins (Specific project only) or the project main module itself

So i wish to have the ability to do source control operations in local repository (track the folder structure up and try find a closest repository), just like TortoiseGit does, rather than force to the project repository.

It's fine for me to stick with TortoiseGit, but I just lose the ability to diff blueprints in editor.

This is my personal speaking, correction is welcomed : )

JimSimons-UH commented 2 years ago

Hi @SRombauts, the main workflow as said above is that in Unreal with larger projects, you develop everything in plugins, especially for DLC where you can split each DLC into a plugin for packaging.

It's convenient to give each plugin its own repo and submodule to it from your main project. This way you can re-use it. Previously with this git plugin you couldn't access the blueprint merge tool as it assumed the root of the project for the repo.

Thanks for the great plugin!

SRombauts commented 1 year ago

@Xist on Discord's Unreal Slackers SRombauts following up from earlier, PR#161 does not work. Right clicking a file in a submodule and choosing a source control command is completely broken. "Show History" doesn't work, "Diff to Depot" doesn't work. Nothing works. Right clicking a file in the main git repo does work. I can see history and diff correctly. I do notice however that there is no "Revert" option, which must be broken.

jimsimonz commented 1 year ago

There's a chance xist's merge was wrong? It does work but I haven't merged it since pushing this. Maybe needs adding to the refactor from https://github.com/ProjectBorealis/UEGitPlugin too.

leszczynskim commented 1 year ago

Hi @SRombauts! Is there any chance that this feature will be merged soon?

Louspirit commented 1 year ago

Hello. Does this PR only works with submodule inside the Plugins folder or any folder? Could solve issue #44

Edit: after some tests, it only works with submodules in the Plugins folder. Any specific reasons to restrict to that folder @JimSimons-UH ?

jimsimonz commented 1 year ago

@Louspirit I'm no longer at UH. Hey, I'm Jim Simons (different Github account). It was a quick fix for that specific scenario where all your plugins are submodules.

Louspirit commented 1 year ago

Ok, Jim. I was only asking if it was easy and not resourceful to check up on any subfolder. Finally, I found that's a better design to use plugins so I moved my shared content inside one. Hope that @SRombauts can merge it soon because it works well on my side.

stilobique commented 1 year ago

Hello, with my art team I wish use Git submodule, the idea behind this solution is to make some plugin librarie ; and I want use this libraries with many Unreal Project. The best way to easily update each project are to used this plugin with a submodule. Really usefull to me.

I'm need to make more test, I look to give more feedback quickly.

Louspirit commented 1 year ago

Taking this doesn't work on UE5.1 because the code evolved. Can you make a new PR @jimsimonz (or update this one)? Or @SRombauts merge it, maybe?

jimsimonz commented 8 months ago

@Louspirit submodules just work now in the later refactored version at https://github.com/ProjectBorealis/UEGitPlugin