Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is prefab folder?

Discussion in 'General Discussion' started by Deleted User, Aug 18, 2019.

  1. Deleted User

    Deleted User

    Guest

    jbb1979 likes this.
  2. James-Sullivan

    James-Sullivan

    Joined:
    Jun 15, 2015
    Posts:
    128
    Is it just a folder called "Prefabs" in the assets folder? Then no, it doesn't have special meaning. As far as I know, the only user created folder that has special meaning is the Resources folder.
     
    jbb1979 likes this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,956
    Amon, Peter77 and jbb1979 like this.
  4. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Don't say must unless you mean must. You don't need such a folder and you may use alternative ways to structure your project.
     
  5. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Placing prefabs in domain specific folders along with the resources that are required to support the prefab.

    Using an alternative name, maybe one that makes more sense in your native language.

    Not using prefabs at all (e.g. constructing entities in code).

    ---

    The point is that MUST means something: you MUST use the 'Editor' folder to write certain types of editor scripts.

    It's typical to use a folder named 'prefabs' for prefabs, but it is not required.
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    To specifically answer these questions:
    You can use almost any name you want and things will be fine, your project will still work.

    The only strange behaviour you'll run into from this is if you accidentally use a reserved name when you didn't mean to. Check out the link @Ryiah posted. The folder names in that list are associated with special behaviours.
     
  7. Deleted User

    Deleted User

    Guest

    Thank you. However, I find it strange that the tutorials in udemy and unity learning always use the word "prefab" in the assets. If they are good enough to create the tutorials, then I'm puzzled why they didn't use other words.
     
  8. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    People typically just like to store all of their prefabs in a root "prefab" folder, similar to storing all scripts in a root "scripts" folder, materials in a "materials" folder, etc. It just makes sense.

    Is there a better word you think should be used? Because all of these are purely subjective standards. You're free to name your folders whatever you want (excluding the special named folders linked above).
     
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,956
    Tutorials are aimed at beginners. A beginner will find it less confusing if the word the tutorial uses to represent a concept is the same as the word used by the game engine itself. As for advanced users choosing different words... what advantage is there to referring to a prefab as anything other than a "prefab"? I certainly can't think of any reason not to use the term.
     
    Last edited: Aug 19, 2019
  10. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    Also, in small projects it makes sense to organize stuff just based on asset type. As projects get larger that'll probably stop being enough at some point.
     
    RecursiveFrog, Ryiah and Kiwasi like this.
  11. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    Why would they use other words? The word 'prefab' has a specific meaning within the Unity context. No other word was chosen to have that specific meaning within that context. The tutorials are aiming to teach skills within that context, so use the terminology of that context.
     
    MadeFromPolygons and Ryiah like this.
  12. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,615
    In my projects I name the folder with all of my prefabs "fabs", That's because my prefabs are usually fabulous. ;)
     
    roojerry and Vryken like this.
  13. Deleted User

    Deleted User

    Guest

    Yes, what does "prefab" mean? I still wish to know. The internet doesn't seem to give any useful information.
     
  14. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Prefabs are simply just assets composed of GameObjects created in the Unity editor.
    IE: "pre-fabricated objects".
     
    Deleted User likes this.
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,956
    upload_2019-8-21_22-57-29.png
     
    Antypodish and Lurking-Ninja like this.
  16. Deleted User

    Deleted User

    Guest

    Thank you very much. I always wondered if this was a short form of some other words. I have no further questions. I did experience strange behaviour after I posted this question but it's not necessary for me to share them. As long as my projects work, it's good enough for me.
     
  17. Deleted User

    Deleted User

    Guest

    Yes I did search but sometimes the explanation is not good. Thank you for sharing.
     
  18. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    What do you mean ny 'Yes?' It wasnt a yes/no question I asked you, and you've just basically ignored my point.
    Prefab, as already said is a shortened version of 'prefabricated', ie made ahead of time.
    I dont particularly believe that that couldnt be found on the first page of result in any search engine query, though; if you're going to continue working with Unity I suspect you need to learn a lot more about how to do internet research.

    Ultimately, though, the Unity documentation explains what prefab means in the Unity context. If people had used other words that arent associated with that context, what makes you think that you'd have been able to find useful information on those words either?
     
    Antypodish likes this.
  19. Deleted User

    Deleted User

    Guest

    Yes means why prefabricated. Whether other simpler words could be used. That's what I'm asking.
     
  20. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Does it really actually matter?

    If it was an issue someone would have pointed it out by now. If you follow the official tutorials, youll learn how things work and what they are named.
     
    Last edited: Aug 22, 2019
  21. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    Honestly, what's the point of asking that? Even if there was a simpler synonym than 'prefab' (and I actually dont think there is, but you're welcome to go ahead, flex your thesaurus), 'Prefab' (which Im going to capitalise to indicate Unity context rather than all the others) is the specific term chosen for that specific thing in the Unity context, and it is an utterly pointless waste of time to be wondering if there is a 'better' term.

    If you want to privately call them sporkfargles, go ahead, but they'll still be Prefabs, because Prefabs is what they are.
    If you want to use 'sporkfargles' as the name of the Unity project folder you put Prefabs in, go ahead; they'll still be Prefabs, because Prefabs is what they are.
    However if you want to start discussing the sporkfargle workflow in the forums, or expecting a tutorial to call them sporkfargles, expect people to react adversely.
     
    Last edited: Aug 22, 2019
    Kiwasi and MadeFromPolygons like this.
  22. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,956
    Because it's the most appropriate word for the way it behaves. The word "prefabricate" means to "manufacture sections to enable quick or easy assembly on site". By creating a prefab you're setting up all the defaults to ones that you need when it comes time to assemble a level to save time. There are no simpler words to represent that behaviour.
     
  23. Deleted User

    Deleted User

    Guest

    ok thank you.
     
    MadeFromPolygons likes this.
  24. Deleted User

    Deleted User

    Guest

    You don't have to question it to this level. I just want to know if there was a meaning to it. Nothing more. If they changed it and called it "things" or "items", something i can understand better, then i would not have asked. I don't think your reply shows you are trying to understand. You sound like you are just telling me "Hey stupid nut, just accept the words as they are". You just don't sound nice. You can check ryiah's reply. That's what i like - short and simple.

    You must also realize that not everyone understands the explanation in the internet even though it might be clear. Different ppl have different ways of understanding things. If everyone understands things the same way, then no point having this forum for discussion.
     
  25. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    But that's not how you presented it:

    "However, I find it strange that the tutorials in udemy and unity learning always use the word "prefab" in the assets. If they are good enough to create the tutorials, then I'm puzzled why they didn't use other words."

    If you think Im labouring the point, that's fair; I am. And I am for a reason. The reason is that you're trying to engage with a problem domain where the specific contextual meanings of things, and the terms applied to those things are important. Very very important.
    But you're rejecting that importance.

    Well, you might not have. But then you probably wouldnt have understood the tutorial either, because 'things' could be any things; there's no specificity. A 'thing' is any thing, of any type of thing. A Prefab, however, is a very specific thing.

    Not believe me? Lets take another example. 'Gizmo'. Why call that as Gizmo, why not just call that a 'thing' or an 'item'.
    Now we've got two Things. Continue for 'Asset', 'Hierarchy', 'Script', 'Inspector'. Dr Seuss would be proud.

    "So take your Thing and put it in the Thing folder next to your Thing inside the Thing and click the Thing box and type 'thing' into the Thing...." isnt going to be a great tutorial.

    Do you get my point? You're resisting the notion that these terms have been made specific for a reason, and suggesting that any generic word would do. They wont.

    The highlighted bit is correct. ( 'Stupid nut' you made up for yourself. )

    When learning something with its own terminology, that's what you have to do. How on earth can you expect to learn something if you don't accept it is what it is?
    And that's the thing; you don't even need to know how it works, as long as you accept it is what it is, accept it behaves how it behaves, accept you use it how you use it. Later you can learn more about how it works etc, but part of learning is, intrinsically, accepting information.

    Resisting that, or quibbling with the information is not going to help you learn in the short or long term. You're not going to help yourself with "why should I accept the facts as they are?"

    Your original question (whether Prefabs have to go in a folder called 'Prefabs') made sense as far as learning. However, turning that into 'why cant we call Prefabs something else, what does the word mean anyway' is going to a place which has nothing to contribute to learning Unity. Seriously. You're time is much better spent practicing with Prefabs.
     
  26. Deleted User

    Deleted User

    Guest

    I understand your point properly. My failure was how I presented myself. If they did call everything as something, it would also be strange. Yes I'll spend more time practising with unity. Please accept my apologies if I offended you in any way. I had no intention to do so.
     
  27. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    Message me if you need any tutorials, Ive been through most of them so can tell you the best from the worst :)
     
  28. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    Im not offended, not in the slightest. Im just trying to help out a bit. I know that getting used to new terminology when learning something is daunting, but that's the nature of learning, and you get comfortable with it over time and familiarity. But terminology is useful, its the precise name of something specific, and its far more important to get comfortable with what that something is and how they can be used, than the name itself. Finding out what's important to know is something to learn all of its own.
     
  29. Deleted User

    Deleted User

    Guest

    This thread has been removed as we have deviated from the original topic. I will open another one asking about get.input.
     
    MadeFromPolygons likes this.