Do you understand prefabs?

Let me know if this lecture helped you learn more about prefabs.

1 Like

Yes this lecture helped me understand the new prefab system. You can do a lot more now with prefabs

1 Like

This lesson seems to skip over how to open the prefab in visual. It went clickedy click, it’s in visual. Ow yeah, and you have to set a parameter (which we won’t show).

Now, I’m using visual studio instead, but thought both should work approximately the same. But can’t figure out how to view the prefab in visual studio

You can open it in any text editor. I would expect that you can open it through the file menu in Visual Studio

The most important part is now I can look into it myself and try to contemplate what my prefab is actually doing.

Somehow vs studio shows only the “editable” files such as txt and script files in the Solution Exploroer.
But you can always just right click on your prefab and open in explorer.

For me personally there wasn’t really anything new to it, but I like how the lesson gives a comprehensive explanation on how they work, and think this could well be modified into a stand-alone lecture. Perhaps throwing in how the inner workings of a scene file and a prefab are similar and where they differ…
Also addiing some explanation on GUIDs and how they’re used in Unity might be a good idea…

On the bad side is just that when I rename the original Player prefab inside Unity my git repository loses track of it being the same asset, so git thinks the Player.prefab and Player.prefab.meta files got deleted and I added some new BaseCharacter prefab.
Instead I prefer to rename them on the git level by issuing a git mv command for each for them (the Player.prefab and the .meta file)…
(One of these days I really need to build a git hook script that can recognize renaming an asset file in a Unity project and grab the meta file to go along with it… or maybe go even more fancy and track renames down by their guid).

While git does lose track of this, it does still function in terms of full rollbacks…
So if I revert to the prior commit, the player.prefab and player.prefab.meta will be recreated and the BaseCharacter.prefab and BaseCharacter.prefab.meta will be removed.

Sure, but it breaks the continuity of changes to the prefab which consider a bad thing that should be avoided.

True, but not much we can do about this. Tis the way of the Git.

Privacy & Terms