I’m working for past two days on plugin using these soruce as reference: Bitbucket.
But the thing is, Is someone else wokring in a git plugin using these interface right now?
There is some plan in the future to build one?
Where do I find more documentation about writing these plugins?
Debuging the plugin is hell, any sugestions?
Should I stop being stupid and buy it from asset store? Any recommendations?
Right now the plugin connects fine with unity, but nonthing happens. I’m using libgit2, to interface with git repo.
I stop working on the “native” plugin for unity, its very hard to debug.
Instead of unsing libgit2 now I’m working with git it self because is more documented, stable and easer to get awnsers to any of my questions.
Using the AssetPostprocessor class I can keep track of moved/renamed files.
Working in a custom editor will give me freedom to work with a single buttom action so artist can sync their changes with everyone else.
About the last one I was tinking in having this sequence of actions:
// force Unity to save all assets
EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo();
AssetDatabase.SaveAssets();
if (projectHaveConflicts)
{
EditorUtility.DisplayDialog("Sync Error", "You need solve all conflicts before syncing", "Ok");
break;
}
if (projectHaveChanges)
{
git add -A
git commit -m <message>
}
// TODO display progress bar
// can I simple push my changes?
if ((git push <remote> <branch> --dry-run).ErrorCode == 0)
{
git push <remote> <branch>
break; // we are done here
}
else
{
// if no pull from remote
git pull <remote> <branch> --progress
}
if (projectHaveConflicts)
{
EditorUtility.DisplayDialog("Unresolved Conflicts", "Some files are conflicted as result of the sync. Resolve these conflicts then resync.", "Ok");
break;
}
else
{
git push <remote> <branch>
}
Can anyone spot any mistakes that this workflow may have?
Developing a native Git plugin for Unity involves substantial effort, and leveraging existing resources, like the Unity Technologies’ Version Control Plugins repository, is a good starting point. However, it’s essential to inquire if others are currently working on similar Git plugins using these interfaces or if there are plans for future development. Additionally, seeking more comprehensive documentation specific to plugin development within Unity can greatly aid in troubleshooting and improving the plugin’s functionality.
Debugging a plugin can indeed be challenging, and seeking suggestions or advice from forums, developer communities, or platforms dedicated to Unity plugin development might provide valuable insights. While considering purchasing a plugin from the Asset Store can be an option, it’s crucial to assess the plugin’s compatibility, features, and reviews before making a decision.
As you continue to refine your plugin, ensuring seamless integration and functionality with Git repositories is pivotal. Considering Codium.ai’s Git Plugin might be beneficial, offering a robust solution for Git integration in Unity workflows. Their plugin streamlines version control processes, enhancing collaboration and project management within Unity, potentially addressing the challenges you’re encountering with the current development.