← Back to context

Comment by doomlaser

8 years ago

You still run with the same naive and expensive boehm garbage collection sweeper that Unity has always had (since 2005?). The machinations some Unity developers go through to avoid allocating memory and inadvertently triggering a sweep are worse than the old days of just managing your own memory manually in C and C++.

Why they have never hired a team to simply create a reference counting fork of their object system is beyond me. Their GC is the reason Unity games have a reputation for running with inconsistent choppy frame rates. You'd think fixing that would be top priority.

But they have never committed publicly to a timeline to fix it, and it is a glaring weakpoint in their runtime environment. Possibly worse than any other, besides the insane and broken way they designed their "prefab" concept. Those 2 flaws have led me to call Unity the "Javascript of Game Engines" in the past. It's not quite that bad, but it's close.

Curious to hear your critique of prefabs.

  • Unlike any reasonable nested entity tree system, you cannot have a prefab that contains other prefabs in its hierarchy, or they lose all concept of being independent prefabs themselves.

    Say you design a car prefab and a wheel prefab. If you put 4 wheel prefabs in your car prefab, and then update the wheel prefab, it will not be reflected in the wheels to your car, because you can not have nested prefabs.

    Neither will any other set of prefabs — say, the tires on your wheels, or the seats in your car — without going to ludicrous workarounds.

    Think about it like a programming language. Imagine if you had a class, and you wanted to include an object of another class in it, but instead of including a reference to that object, your IDE just pasted the entire contents of its class implementation verbabitm into your class, once, and left it like that.

    That is how they designed it and that is how it has been, to the frustration of all, for over 13 years. Everyone has to design around this bizarre limitation that isn't present in any other (even simple) game engine. They've promised to fix this before, but haven't.

    Now do you understand?

    Unity is filled with weird kludges like this, that aren't apparent when you are just starting, in basic systems and critical corners, which is why so many are frustrated with it, despite its strengths in platform ubiquity and market adoption.

    • Yeah, that makes sense.

      I remember when I first learned I couldn't nest prefabs, and I couldn't believe it. Here's hoping they actually fix it.

      Besides that, I think the Unity prefab system is really nice, and Unity in general seems very nice.

      But I may lack context! I'm coming up on two years using it, and it's my first time working with a game engine (or in games).

      Still, it seems much nicer than interface builder or qt designer.