Prefabs & Prefab Variants - Unity Tutorial
Вставка
- Опубліковано 8 вер 2024
- Learn what prefabs are, how to use them, and how to take advantage of prefab variants to maximize re-usability in your games.
❤️ Become a Tarobro on Patreon: / tarodev
=========
🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: / discord
✅ MORE TUTORIALS: / tarodev
About Tarodev:
Develop video games like a pro!
Whether you're a beginner or a seasoned game developer, you'll find lots of useful tips and tricks to boost your development career. Visit the channel: / @tarodev
Super helpful! I understood prefabs but I didn't understand the variants until this video.
They're super handy. Always make a 'base' variant for game units as they'll usually share certain components like healthbars, colliders, etc.
That's a great explanation. Thank you for keeping it concise and short.
This is really cool, thanks for the easy to understand explanation too :D
I really appreciate your videos! Thank you.
good vidio will help when making longer games whe I am at intermidiat level in game dev. :)
Thanks for the tutorials! Went through basically every video on the channel today, best C#/Unity content on youtube. Regarding this video: crazy thought, but isn't this roughly analogous to inheritance? Would it make sense to have a base prefab, then variants for dynamics or interactables, and assets would be a variants of those. Then you could do stuff like toggle shadows for every object at once, or change interaction distance for every button/door/switch in the game. Probably exactly why variants were even made. Maybe there could even be scripts for stuff like mesh colliders made automatically from the mesh filter. Something to tinker with later.
very good tutorial, subscribed right away :)
Welcome aboard
Nice video. Thanks!
maaaaan you're good) and interesting themes and all's clearly explained. I'm glad i found your channel! Mb let's create some game?
such a good lesson!
thank you
Thanks from Russia!
это сообщение с автоматическим переводом
hi, I've tried making 3 different kids of balls. All of them are different sizes and that works just fine, but when I change the color, it applies to all the variants, included the original one. Can you help me please?
Cool!
great, but why not explain the benefits in performance of doing this, rather than creating each one as its own standalone prefab?
Something i couldn't wrap my head around in varaints is the part of the manual that says "Note: When editing a Prefab Variant in Prefab Mode, you should understand that applying these overrides (via the Overrides drop-down window or context menus) will cause your variant’s variations to be applied to the base Prefab Asset. This is often not what you want. The point of a Prefab Variant is to provide a convenient way to store a meaningful and reusable collection of overrides, which is why they should normally remain as overrides and not get applied to the base Prefab Asset." Could you please clear this up?
Thanks in advance
so this is basically what classes are in unity. you make an instance var turn into a class by turning it into a pfab and you can create subclasses from it.
Which shader you are using for slime?
How do you make the slime shader? I really like how that looks.
when i create the prefabs folder and drag in a model, it doesn’t become a prefab. it stays a model
Hi sir ji I need help how to access child of prefab through script in unity?
Depends what you need to grab. You there is a script or component on a child you need you can do: transform.GetComponentOnChildren();
If you need simply one of the child transforms you can do transform.getChild(i)
@@Tarodev okk