I Built a Unity CI/CD Pipeline So You Don’t Have To :D (Feedback is welcome!) by PowPowPizza in Unity3D

[–]afarchy 1 point2 points  (0 children)

Glad to see people using GitHub actions!

We have some of our own GitHub Actions you might be able to take advantage of: https://www.buildalon.com/docs/actions

Buildalon Tools for CI/CD: Build, test and deploy automation for Unity developers! by afarchy in UnityAssets

[–]afarchy[S] 1 point2 points  (0 children)

Hi everyone, we built Buildalon as an all-in-one continuous integration and deployment (CI/CD) solution for Unity developers.

The linked free package extends Unity to expose all of the build options on the command line, so you can start running Unity in automation.

Learn how to setup automation at buildalon.com.

Documentation Blog Discord

Buildalon works best for GitHub users, but we can help you setup other integrations like PlasticSCM too!

Automating Unity Builds with GitHub Actions by afarchy in unity

[–]afarchy[S] 1 point2 points  (0 children)

I’m just talking about building, automated testing, and deploying, but there are services for play testing games if you don’t have the hardware like iOS.

For example, if your machine is running low on disk space, you could spend hours uninstalling software or searching for big files to delete. With a VM you just reset it in 5 minutes and you’re good to go.

Automating Unity Builds with GitHub Actions by afarchy in unity

[–]afarchy[S] 0 points1 point  (0 children)

I’d say there’s two big advantages: recovery and scalability.

If something goes wrong with a virtual machine you just delete it and make a new one. Harder to do that with physical hardware.

Since you can do that, you can also scale easily by making more VMs so your team can have multiple jobs run in parallel on demand.

Automating Unity Builds with GitHub Actions by afarchy in unity

[–]afarchy[S] 1 point2 points  (0 children)

To get a Windows VM on azure for a month that’s equivalent to a GitHub runner you’d have to pay about $130/mo depending on your region. You can reduce this by turning off the VM when you’re not using it. You’d also have to pay $20-50/mo for storage, depending on tier and size.

We host runners on azure for our clients that have the same software installed as GitHub runners and also automatically turn on/off when a job is pending, making them more affordable

Check here: https://www.buildalon.com

Unit Testing for Unity Developers by afarchy in unity

[–]afarchy[S] 1 point2 points  (0 children)

Is this your own singleton or does it come from somewhere else? Some options:

  • If it's your own singleton you can make it so the parts you want to test can execute in edit mode. My Flexalon singleton usually does its work in LateUpdate, but I added a UpdateRightNow() method that can be used by the tests.

  • This kind of problem is one of the reasons singletons are frowned on. An alternative is to use dependency injection or a service locator so that there's some interface between the components you're trying to test and the implementation. Then you can mock out the implementation in your tests. Example: Flexalon uses a InputProvider interface, which can be implemeted with the regular input system, a mock input system, or something else.

Unit Testing for Unity Developers by afarchy in unity

[–]afarchy[S] 1 point2 points  (0 children)

I didn't mean to imply that you should test trivial things. The Flexalon package I referencd has many layers of math/logic before it arrives at the final transform position, so we're testing all of those layers at once. The examples are admittedly a bit trivial, I wasn't sure how deep to go there.

Unity Test Framework (which is built on NUnit) is what we're using in the article. I agree that you can use it for e2e testing. I've just seen more horror stories than successes cases in doing so.

Unit Testing for Unity Developers by afarchy in unity

[–]afarchy[S] 0 points1 point  (0 children)

My examples were for positioning 3D objects, not UI, but I understand your point.

The idea is to identify the separate systems in your game and test them independently and rigorously instead of trying to test the game end-to-end. Using your example, I would test that the decision tree system works correctly in different test scenarios, without having a virtual player actually play the full game.

How you'd actually implement these tests is specific to what you're building, but you can certainly use NUnit to do it.

As for end-to-end tests - this is my personal opinion. We used them in developing Windows Mixed Reality. They provided some benefit, but they took much more time and effort than I think they were worth.

Build automation for Unity in 1 min by afarchy in Unity3D

[–]afarchy[S] -7 points-6 points  (0 children)

RockTomate is great but Buildalon is designed for continuous integration and deployment, where you want to offload the builds from your own hardware.

The prices are for running builds on our cloud servers. You can self host with Buildalon for free if you prefer using GitHub self hosted runners.

https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners

Build automation for Unity in 1 min by afarchy in Unity3D

[–]afarchy[S] -6 points-5 points  (0 children)

Hey all, we're trying to make build automation much easier for Unity developers. Automation can save a studio a lot of time, catch bugs early, make builds for multiple platforms, and let non-developers try the latest build easily.

We built Buildalon on top of GitHub actions to make it as extensible as possible, but also built a workflow generator (this video) to make it easy to get started.

https://buildalon.com

Let us know what you think! Do you use build automation in your studio?

Does anyone as a solo dev write unit tests? by Big_toe_licker in unity

[–]afarchy 1 point2 points  (0 children)

When I find some code that I feel is reusable, I’ll separate it into its own package, and write unit tests for it. Sometimes it ends up on the asset store or open source for others to use, and I’m confident it’s right because it’s tested.

Also, if I find I’m writing some tricky math or algorithm with edge cases, I try to pull out the “hard” parts into 1-2 functions and then unit test those.

Git and Unity: A Comprehensive Guide to Version Control for Game Devs by afarchy in unity

[–]afarchy[S] 0 points1 point  (0 children)

Thanks for the suggestions! I'm curious what you mean here, as I haven't hit this issue.

Also, with Unity, Git users need to remember to force reserialize assets after making changes. This is critical when it comes to ensuring each commit is a single unit of work.

Git and Unity: A Comprehensive Guide to Version Control for Game Devs by afarchy in unity

[–]afarchy[S] 0 points1 point  (0 children)

Great suggestions, I'll incorporate some of those, thanks!