Building with Unity on Bitrise: Feedback wanted

Hello Unity Developers! :video_game:

We’re excited to expand our journey into the world of Unity on Bitrise. As we navigate these stages, we recognize the unique challenges and needs faced by Unity developers like you.

Just like our other features, such as Bitrise Insights and Bitrise Build and Test Cache, we believe in continuous improvement and iteration. And the cornerstone of that process? Feedback directly from our user community.

Whether it’s a new feature request, a suggestion to enhance the workflow, or even a minor bug you’ve noticed - your feedback plays a pivotal role in shaping our platform’s Unity integration for the better. Positive or constructively negative, every bit helps us make Bitrise more attuned to your Unity development needs.

Join us in this journey. Share your thoughts, experiences, and ideas on building with Unity on Bitrise. Let’s make magic happen, together.

Please share your thoughts in this thread :point_down: .

Thank you for being a crucial part of the Bitrise community. Your insights pave the way for a brighter, more efficient Unity development experience for all.

I followed the instructions for setting up a Unity build, but it doesn’t look like it was tested properly. There were some steps missing or broken:

  1. You have to install the packages you download using commands like
sudo -S installer -package /Users/vagrant/git/installers/unity.pkg -target / -verbose
sudo -S installer -package /Users/vagrant/git/installers/ios.pkg -target / -verbose
  1. When running the Unity build it says to use -executeMethod BitriseUnity.Build but you need to add a file to your project first, that I found at https://github.com/bitrise-io/sample-apps-unity3d/blob/master/Assets/BitriseUnity.cs. I also needed to add -buildTarget ios to the build command because it wasn’t being done properly by that file.

  2. The command you specified to deactive the license always returns with a bad exit code. You need to specify a username and password in the command (-username "$UNITY_EMAIL" -password "$UNITY_PW").

After solving those issues, I’m now trying to make the build go faster. It takes around 25 minutes to build a fairly small project (compared to about 20 seconds on my laptop). The logs specify “[Package Manager] Done registering packages in 1296.25 seconds” so I’m guessing that’s where most of the time is going. Any ideas for how to speed that up?

I’ve tried adding a cache with these folders, but it didn’t seem to do anything:

  • /Users/vagrant/git/Library
  • /Users/vagrant/Library/Caches/com.unity3d.UnityEditor
  • /Users/vagrant/Library/Caches/Unity

Also, it’s a very good idea to cache the directory where you download your Unity installer packages, and that should be added as a recommended step. It saves me about 10 minutes per build when I test if the files exist before trying to download gigabytes of installers.

If you’d like to take a look at my workflow then the ID is d5680ee5-710d-47bb-ba9f-e26fe54bc3e6.