Unity Cloud Build?

Wed 30. Aug 2017, 00:17

Is there a way to generate the code needed for Unity Cloud to build our projects with articy files?

I see your other post about it mentioned command line options, they don't have support for that but they do have this:

https://docs.unity3d.com/Manual/UnityCl ... thods.html

If you create a public static method in your Unity project, you can direct Unity Cloud Build to execute it before the project is exported by the Unity Editor.


Would I just put in "ArticyEditor.ImportArticyExport" in preexport methods? I'll try this out, but I wanted to make this thread anyway so that people know what to do for Cloud Build.
Raidenthequick
 
Posts: 5
Joined: Tue 11. Jul 2017, 09:27

Re: Unity Cloud Build?

Wed 30. Aug 2017, 09:05

Hi Raidenthequick,

while in theory it could work, the problem could be the fact that the import process in the plugin is asynchronous.
While you could trigger that method there is no way of knowing when the import process is finished, as it takes many update cycles until that is done. And i'm not sure if the cloud build process can deal with that. Also the importer relies on multiple "builds", what that means is when the import is started the plugin will "Generate classes -> wait for unity to recompile -> import the project data using the generated classes -> create script fragments found in the scripts in the data -> wait for unity to recompile -> finalizes the import". This "wait for unity" is also the reason why the import process must be asynchronous, as it is unity that reacts to the source code changes, recompiles and makes them available for instantiation. For example to create a specific entity, fill it with its correct data and store it in the database, the importer needs to find and instantiate the generated class first.

I'm open for any ideas that would make cloud build support possible, but i'm afraid this would need a lot of changes and is therefore not feasible.

Best regards

Nico
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Re: Unity Cloud Build?

Mon 11. Dec 2017, 11:14

We have same issue with cloud builds in our own environment (jenkins based, articy plugin 1.1.4, 1.1.5). The probles is ever commiting all files in generated folder you can got articy importing from time to time. And this reimported files would be with zero diff with origins.

According to the question - please add counter to importer method and increment it after each async step. In this case prebuild method could lock execution before all steps would be done.
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Unity Cloud Build?

Thu 14. Dec 2017, 11:18

Hi misterionkell,

I am not sure I understand your approach. Where should be a counter and what should it count?

Is it not better to create a "lock" file when the import is started, that is deleted when the import finishes, so you could wait until the file is present. Or do you think this might be a problem because that file would trigger Unity to create a meta file for that "lock"?
User avatar
[Articy] Peter Sabath
Articy Staff
Articy Staff
 
Posts: 89
Joined: Wed 23. Nov 2011, 13:58
Location: Bochum

Re: Unity Cloud Build?

Thu 14. Dec 2017, 17:14

[Nevigo] Peter Sabath wrote:Is it not better to create a "lock" file when the import is started, that is deleted when the import finishes, so you could wait until the file is present. Or do you think this might be a problem because that file would trigger Unity to create a meta file for that "lock"?


Yes, Unity will create meta for that file. In general you can use any types of lock mechanism to allow user call this custom build step and be locked in this state while articy import job do not be finished. This can be registry entry, tmp file, counter in plugin code, file, entry in articy plugin settings file.
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Unity Cloud Build?

Mon 8. Jan 2018, 14:25

Hey, guys! Could we bringh new life to this topic? Now we have build pipeline with our Jenkins server (8 build in parallel - 3 for steam (PC,Mac,Linux), 4 for mobile (2 Android and 2 IOS) and one for PS4) and Articy plugin fails in 8 times from 10. We check it much of times - it has (for me) unexpected behaviour: you never could know is Articy data would be ok or not. We have git precommit rule to check each Articy export - all files, meta data and so on and each update of Articy file every time contains all Articy Generated files and settings.

I know your have one good answer for me :) - compile all builds by hands. Do not ask me about this please - each build takes ~4 hours and 120 gb of space and we can`t handle it withour cloud infrastructure.

You should include any types of crooked nail solution for this.

p.s. Now we are thinking about running Unity with AutoIt and manage Articy Plugin on screen which looks like a shit over all.
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Unity Cloud Build?

Tue 9. Jan 2018, 16:51

up
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Unity Cloud Build?

Wed 10. Jan 2018, 15:50

Hi misterionkell,

sorry for the long delay in answering / providing any news.

I have just uploaded a preview version

Unity 2017: http://www.nevigo.com/download/importer-unity/ArticyImporter2017_32517.unitypackage
Unity 5.5-5.7: http://www.nevigo.com/download/importer-unity/ArticyImporter_32517.unitypackage

Those version create the file(s)

LockFileImportRunning when an import is running
ArticyImportFailed when an import has failed

both files are created directly inside the unity project folder (directly outside of the "Assets" folder)

Will this work for you, so we can add this to the official release?
User avatar
[Articy] Peter Sabath
Articy Staff
Articy Staff
 
Posts: 89
Joined: Wed 23. Nov 2011, 13:58
Location: Bochum

Re: Unity Cloud Build?

Wed 10. Jan 2018, 16:34

Checking it. I will write right after we do some tests guys. Thank you. Peter could you also clarify one thing - is Articy files (all generated, meta, settings and so on) commited on PC1 don`t require any reimports on PC2?
User avatar
misterionkell
 
Posts: 37
Joined: Mon 8. May 2017, 16:57

Re: Unity Cloud Build?

Thu 11. Jan 2018, 12:25

A reimport should not be required when you commit all files.

But if you use SVN you will need some extra handling with deleting not longer used files and binary files will get overwritten on the next export clearing the read-only flag that SVN adds automatically for files that have the "needs-lock" property set, which is an auto-property for most binary files in an standard config. This is not a big problem if those files are not modified from other users and not need for a merge of binary files arises.
User avatar
[Articy] Peter Sabath
Articy Staff
Articy Staff
 
Posts: 89
Joined: Wed 23. Nov 2011, 13:58
Location: Bochum

Next

Return to articy:draft Unity Importer

Who is online

Users browsing this forum: No registered users and 59 guests

Who We Are
Contact Us
Social Links