Interview

Unity on the long and challenging road to developing workable nested prefabs

Unity on the long and challenging road to developing workable nested prefabs

Following Unity’s Unite Berlin 2018 conference one announcement stood out more than most, owing to the vivid applause and sense of relief from the crowd.

The reason for that swirl of emotion was that nested prefabs are on the way.

Unity’s history with the time-saving implementation was aptly summed up by former Unity CEO and co-founder David Helgason, who upon making the announcement joked that he had been secretly embarrassed about the subject for years.

A demo then followed and was capped off by the team behind the project taking to the stage, greeted by an onrush of excitement and copious confetti.

What prefabs do may come across as relatively simple in thought, but in practice goes a long way to making a developer's life 'easier'.

Prefabs allow developers to take an object or asset and use it repeatedly throughout their creation. If an edit is made to the prefab, the effect finds its way to other samples within the game.

The upside is that hordes of objects are controllable without the need to tweak each one individually.

Unity's nested prefabs pipeline goes a bit deeper on that idea and allows developers to place one prefab inside another, which means that they no longer have to choose between creating large prefabs, like a house, or a small one, such as the furniture inside said house.

We recently took the opportunity to fly to Unity’s Denmark HQ, a vast and old post-office in the midst of a renovation that finds itself snuggly stored away in one of Copenhagen’s many side-streets.

We caught up with Unity’s prefabs team ahead of the Unite Los Angeles 2018 conference and spoke to user experience designer Nikoline Høgh to find out more about what’s on the way and the long journey that led there.

PocketGamer.Biz: What’s the feeling like within the Unity camp now that nested prefabs are on the way?

Nikoline Høgh: So right now we’re in beta, which means we have users starting to dig into the features and give us a load of feedback.

That means we’re in the final stages of stabilising the tools and getting closer to the point that this is no longer a beta and is something you can base your games upon.

I think that the final release of excitement will come with the 18.3 update.
Nikoline Høgh

There's a lot of excitement, but we want to get it right and we want to make sure we can get as much in as possible before we’re ready.

I think that the final release of excitement will come with the 18.3 update, which is the third release of the year and the one we’re scheduled to go out with.

When that comes out, I think we’re going to be very happy.

Former Unity CEO and co-founder David Helgason joked about being “secretly embarrassed” about the subject for years. How long have nested prefabs been in your thoughts and development?

Before I started working at Unity, I was dabbling in making games around six or eight years ago and was using the prefab system then.

I remember thinking ‘why can’t I just take this little thing and put it inside this other little thing? Then everything would be amazing.’ So, for me, it’s been a joy to work on this as I’ve had a personal attachment to it. But the current team has been working on this for about a year and a half.

Unity's prefabs team is based in Copenhagen

We were put together with some resources to try and solve the problem and to really get that out there.

There have been other attempts to create these features in the past, but those were other groups of people on different endeavours.

What were the most significant challenges you ran into and why do you think it took as long as it did?

I think the challenge the team had was that they were building something that they assumed that people wanted and then when they went out there and validated it, they found out it wasn’t necessarily encompassing all the needs of the users.

We were put together with some resources to try and solve the problem and to really get that out there.
Nikoline Høgh

So we went out there and spoke to studios small and large and really re-scoped that, based on what we found to be the needs of our users.

So I think that took a little bit of time because we were building something, not for ourselves, but everybody else.

Can you tell us more about what that process was like? 

So the method, or the way we go about it, is that you always start with an assumption, which is: ‘We think we need to build this, we’re hearing this from the community and we have this idea of what it should be'.

The thing is, as humans, when we imagine something we all imagine it a little bit differently.

So the key is really to, as soon as possible, get it into some state where somebody else can have a look at it and validate it.

So we worked that way very intuitively, we prototyped stuff in small steps and brought in users all along the way.

As to how we overcame the issues, I think it was about being thorough and, actually, very methodical in the way we went about things.

And also to have a certain humility that your first ideas are often not the ones that people need. So you have to be open to that process of being willing to take in that feedback as it comes.

How highly requested has this feature been and for how long?

Ever since the prefab system was created it has been requested by our community and, in a way, it’s really just how you’d expect any kind of template system to function.

You also have this type of reusable object system in other 3D software and 2D software like Photoshop. You have embedded files.

A spider-drone created through the Unity prefab mode

If you can create something that you can reuse, you also expect that you can make other things reusable inside of that so that you can build up that logic.

So in a way, I think that from the beginning it was something that we knew that was an important problem to try and solve; it’s just that implementation and the workflow have taken a while to come to completion in the best possible way.

Why are developers so keen on nested prefabs?

I think it’s a productivity thing above all. We know that from speaking to our users.

If you can create something that you can reuse, you also expect that you can make other things reusable inside of that.
Nikoline Høgh

Again, it’s an expected behaviour. It’s something that should just work. So when you need it and you meet this limitation of it, it kind of grates a little bit.

But it’s really about productivity and enabling the designers and artists who work with Unity, so that they themselves can sit and create the big worlds with all the content and variety in it themselves.

You’ve said previously that the long-term goal has been not only to implement support for nesting but to rethink the core prefab workflow so different team members can simultaneously edit them confidently and efficiently. Why did you think the rethink was necessary?

Collaboration is one of the big pinpoints in any games development process, no matter what kind of tools you use, because you are on a creative endeavour together and usually you are a lot of people who are trying to work on the same thing.

That means you have to find a way to slice up the pie. You have to find a way so that you and I can simultaneously work and see the shared vision, but can take a piece of it out and work on it while not crossing paths with each other.

One of the big pains in games development in general, and I think any editor or studio can speak to this, is that those kinds of collaboration conflicts are something that really slows down production.

It’s one of the things you don’t want to have to think about when making a game.

What are some of the new tools you’ve introduced and how do they work?

So high-level wise we’ve introduced three new features: prefab mode, nested prefabs and prefab variants.

Prefab mode is a dedicated safe editing space where you can open up a prefab in isolation and make changes to it.

You are editing the prefab file itself, which gives you a lot of control over what you’re doing, and it also helps you to work within an environment where you’re not distracted by your game world or other things that might be going on.

The same spider-drone's assests replicated

With the nesting of prefabs, it’s about scalability and productivity. It’s about adding that flexibility to the system, and really it’s how you would want it to work when you have a template system, that you want it to be connected and you want to be able to nest objects inside of each other.

As far as the feedback goes that we’ve started to get from users who are using the beta, it’s been productivity boosts of up to hundreds of hours.
Nikoline Høgh

Prefab variants is the idea that you can create inheritance between prefabs, it’s almost like in programming when you can have one file that inherits old properties from another file.

In this way, you can create variations. So if I have a flower, and it’s red, I can also make a yellow flower or a white flower. If I change the original flower all the others will change, but they’d also be individual flowers by themselves, so I could put them in a scene.

How much time and expense do you estimate this will save for Unity developers?

It depends on the scale of your production and how many people you have working together because all of these effects accumulate.

But as far as the feedback goes that we’ve started to get from users who are using the beta, it’s been productivity boosts of up to hundreds of hours.

Do you have a soft date or a hard date for when will these tools be available for everyone to use?

We’re scheduled for an 18.3 release, which means it’s the third release for this year. We don’t have a hard date, but it’ll probably be around the end of the year.

Full disclosure: Unity paid for travel to its office. Coverage remains neutral.

Tags:
Staff Writer

Iain is a freelance writer based in Scotland with a penchant for indies and all things Nintendo. Alongside PocketGamer.Biz, he has also appeared in Kotaku, Rock Paper Shotgun, PCGamesN and VG24/7.

Comments

No comments
View options
  • Order by latest to oldest
  • Order by oldest to latest
  • Show all replies
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to Steel Media's privacy policy.

Steel Media websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.