Why add rigidbody programmatically?

Rick says if we have an artist who’s helping us we want to add the rigid body in the script. I don’t get this logic. Can someone explain? I mean is adding a component on top of what an artist already did is disrupting usual workflows in game studios?

Hi shampoo,

There is no such thing as “usual workflows in game studios”. Each game studio has got its own workflow. If you are new in a team, people will tell you what you are supposed to do. Also, you cannot know in advance what problems you are supposed to solve for a game studio.

In this course, you are everything: the game designer, the programmer, the art director, and so on. In a game studio, it might be that you are “just” a programmer who is supposed to make other people’s ideas come true. For this reason, it is always a good idea to know more, even if you don’t need everything all the time because it might be that one of those things might become handy for a problem you don’t know yet. That’s what Rick meant.

An example: Imagine a game studio wants to allow gamers to add their own enemies. Of course, the studio will not publish the source code of the project. Instead, the studio could allow other people to fill in a json file.

The programmer’s task would be to make the game create the enemies based on the json file provided by somebody else. One would import the json file into the game at runtime, process the data at runtime and create enemies based on the json file and maybe a sprite or a mesh at runtime. There is no way for you (or the artist) to do that in the Unity editor because you do not know in advance what those people will do once the game studio shipped the game. And you certainly will not create custom characters for thousands of gamers without getting any money for it, hence the json file. A solution could be to create game objects at runtime and to add components to those game objects at runtime.

See also:

1 Like

Thanks that makes sense actually.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms