We also use a buildpipeline with TeamCity and now I don't know how to operate right now, we're setting up our project right now and as of now I don't know what to do with the generated content.
Should I add the generated content to git?
This may lead to merge conflicts as Moritz pointed out, although I don't think I will run into this very issue since there is only on Articy Project and only one person does any changes to that project - me. The only thing that will happen is, that I do changes in the Articy project and export them to the Unity project overwriting the previous generated content. Will this lead to any problems?
Should I ignore the generated content ?
Now when I ignore it, I have to hack a reimport when the buildserver pulls the project and starts Unity in batchmode.
Before the build begins I have to initiate the reimport, monitoring the two lock files “ArticyImportRunning” and “ArticyImportFailed”.
I did try to call the ImportArticyExport method via reflection which...works? The Progressbar pops up doing some articy related things and at the end I get the "ArticyImporter: Finished importing articy:draft data!" Debg Log in the Console.
But I always get the "ArticyImportFailed" file in the root folder. On top of that I tried to initiate a build right after that which...leads to a multitude of other problems:
This simple code here:
- Code: Select all
public void ImportArticyProject()
{
Type.GetType("Articy.Unity.Editor.ArticyEditor, ArticyImporter.Editor")
.GetMethod("ImportArticyExport", BindingFlags.Static | BindingFlags.NonPublic)
.Invoke(null, new object[] {false});
BuildPipeline.BuildPlayer(levelNames, path, BuildTarget.StandaloneWindows64, BuildOptions.None);
}
I execute this code through a button, want to build an empty scene in a basically empty project with only the articy export file in there. The import tries to do it's thing but ofc this doesn't work, since the BuildPipeline.BuildPlayer line of code doesn't wait for articy to be reimported and tries to build. Articy reimporting scripts and Unitys Build process trying to reimportant simultaneously is bad and throws a bunch of errors.
So in conclusion:
I need my script to reimport the Articyexport, monitoring the availability of one of the lock files (which at my end is always the "ArticyImportFailed" for some reason
![Traurig :(](./images/smilies/icon_e_sad.gif)
) AND when successfully, only then I can initiate the build.
This seems quite cumbersome and I wished there wouldn't be the need for...at least half of that. Maybe for the time being:
- make the import function public to us (that's already on your roadmap afaik)
- instead of monitoring lock files, make some events: OnImportArticyExportRunning/OnImportArticyExportSuccessfull/OnImportArticyExportFailed
That would give us devs a bit more leeway
![Lächeln :)](./images/smilies/icon_e_smile.gif)