- Home /
Command line iOS builds taking ages due to PVRTC
I'm currently using jenkins to build an iOS version of our game and the build times are up to 50 minutes compared to 2 minutes on a dev kit.
I've timestamped the build and a large portion of it is spent on PVRTC. Even if I choose not to clean the workspace it still decides to regenerate the PVRTC stuff.
I'm using the following in my CS editor script:
Code (CSharp): BuildPipeline.BuildPlayer(SCENES, "/Users/build/Builds/Output/GameIPA", BuildTarget.iPhone, BuildOptions.None); ScarletPostProcessor.OnPostProcessBuild(BuildTarget.iPhone, "/Users/build/Builds/Output/GameIPA"); I may be being stupid here but I can't seem to find any build option that allows me to disable PVRTC compression via the Command Line build.
What do you mean by dev kit? Your local developer machine or a actual iOS devkit?
You can try and disable your textures via a script just to test the configuration if you like. http://forum.unity3d.com/threads/turn-off-pvrtc-compression.31524/
You could check if your Jenkins build uses a CPU/GPU sofware emulation or something comparable to build the PVRTC while your local developer machine which would explain the huge difference.
If you have time you should try out the Free Unity Cloud Build Service! $$anonymous$$aybe that's an option to replace your Jenkins system ;-)
Thanks $$anonymous$$,
Is there a sensible way to disable the textures in a script rather than in the Unity Editor?
By dev kit I mean just a standard windows or mac box. Nothing special.
We'll definitely look into Unity Cloud build at some point :)
There should be, you can also just replace all textures with a 1px graphic to see the impact. I guess you use a SC$$anonymous$$ tool to so you can revert it easily anyway.
$$anonymous$$ore than that, I just wonder now as you make a build system if you start Unity freshly every build, you need to switch to iOS platform and reimport all images every-time if you don't store the Library folder. $$anonymous$$aybe cache server would help too in this case. Do you use cache server already?
As it stands I'm using AssetDatabase.ImportAsset with various different compressions prior to our BuildPipeline.buildplayer line in our editorscript.cs but it doesn't seem to make any difference at all. All the PVRTC stuff still seems to be happening.
We don't use a cache server we just bring down the latest version of the code from perforce and call a buildpipeline.buildplayer on it.
You could swap temporarily a custom executable for Unity's PVRTC compressor, so it takes only a few milliseconds and doesn't actually compress. Or run a custom script before the build which iterates over all textures and changes the compression mode, comparable to http://wiki.unity3d.com/index.php/TextureImportSettings
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
How can I find the line number in flash build error (simple)? 1 Answer
Command Line Compiler in 3.3.0 0 Answers
iOS vs Android build 6 Answers
Stops waiting with Created GICache directory at command line build. 1 Answer