2 min read
Featured Blog


In which I complain about children and components.

In between a war and a hard place life goes on and code is written. But since I'm not in the happiest mood to write something constructive I'll complain. And what shall I complain about, oh great and noble sir or madam? What a silly question... Unity of course.

Let us imagine a game object. An entity if you please. And let us call it, um, I don't know, "Amir". Let us delve deeper into the mysteries of creation and attach three other entities to "Amir" (parenting if you will). We shall dub these, "Rob", "Bob" and, eh, "Slob". Why not?

To each of these strange and wonderful objects we'll endeavour to attach a single component called "Health". Now, four entities, four components. Let me paint you a picture. A simple one, of hard lines and boxes. Of the UML persuasion.



Pop quiz, hotshot.


How many components have we got?

My wife's (who is both amazing and wonderful) first reaction was:

"Are you really going to teach me programming at ten at night?"

I proceeded to get a notepad and she sighed, resigned. Her second reaction, after a quick sketch.


And if that wasn't your first reaction you should probably think long and hard about life in general... Of course if that was your first reaction you probably haven't been working with Unity for very long either.

"Ah ha!" I exclaimed loudly, "You would think so!". Then hung my head, "But the answer is four".

I'll end this post with a quote from the Unity's documentation page.
Returns all components of Type [type] in the GameObject or any of its children.

Why? F*** if I knew...

"In truth I haven't played much since the baby came in June but give me half a minute an' I'll get this fiddle back in tune"

Latest Jobs


Playa Vista, California
Audio Engineer

Digital Extremes

London, Ontario, Canada
Communications Director

High Moon Studios

Carlsbad, California
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
Lead UI Programmer
More Jobs   


Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter


Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Follow us


Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more