Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

What's the matter with your Prefab Editor?

Discussion in 'General Discussion' started by JGameMaker92, Sep 23, 2022.

Thread Status:
Not open for further replies.
  1. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I’ve been jumping through hoops for this editor for years. I can recognize a bad user interface when I see one. Just because I start editing a prefab with missing scripts doesn’t mean I should be locked into the Prefab Editor until it gets fixed. It is a problem and I’m going to keep trying to convince you all that it is. I hear all of your ways of avoiding the problem and I’ll definitely be doing more avoiding it in the future until things actually change. The Prefab Editor needs improvements and I don’t think anybody here can argue that it is absolutely, and irrevocably perfect beyond any need of change.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    We have literally told you why it does this multiple times and you have said we are all wrong because you refuse to accept the truth.

    This keeps happening to you specifically because you specifically refuse to learn or admit you're wrong, even when presented with evidence as to how you are wrong. The way serialization works has been explained. The reason this provides an error instead of a warning has been explained. The reason you shouldn't even want to save a prefab in this state has been explained. The reason you are experiencing this problem has been explained.

    The one common thing between all these explanation is that you do not know, nor do you wish to know, how to use the editor.
     
    xVergilx and MadeFromPolygons like this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    Good thing then that none of us are saying that.

    https://en.wikipedia.org/wiki/Dunning–Kruger_effect
     
    xVergilx and MadeFromPolygons like this.
  4. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    This is not happening to just me. This problem has also been replicated by other people. I could throw psychology wikipedia links at you too and try to make you sound like you don’t know what you’re talking about either. If you’re just going to troll then get off of my thread. There’s plenty of reasons why someone would need to save a prefab in an unideal state. There’s plenty of reasons why someone would need to get out of the Prefab Editor to see the rest of their project. I’m not asking for anything illogical here.
     
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    It was replicated by somebody in this thread after they went out of their way to replicate it. This being replicable doesn't mean it is the unintended behaviour.

    Again:
     
    MadeFromPolygons likes this.
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    I can very easily replicate Windows telling me that I shouldn't be playing around in the Program Files or System folders too but that doesn't mean it's wrong for telling me to do so and should let me do whatever I want.

    I can't think of a single reason why you would need let alone want to leave a prefab in a busted state, but if you'd like to chime in with some of your reasons I'd love to hear them.

    You mean like you've literally been doing this entire time to every single person who responded to you? I linked that psychological article because to be blunt you're coming across as someone who is trying to tell everyone the world is flat and the moon landings were faked.
     
    Last edited: Sep 28, 2022
  7. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I think you two have said your fair share. How about you go find another thread to invest your time in? You can turn your notifications off for this one. Thank you for your input but I’m ready to hear from some other people.
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    You're not going to like the responses because they're not going to be different from us, but you're right I'm tired of responding to someone that has shown themselves to be unable to be reasoned with.
     
    MadeFromPolygons likes this.
  9. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    Especially when you consider - if you could leave a prefab in a corrupt state - how those issues could proliferate across other parts of one's project that use this prefab.

    You're just trolling yourself at this point, mate.
     
  10. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    You mean you're ready to wait for a single person to agree with you so you can throw out what everyone else has said.
     
    JoNax97 and MadeFromPolygons like this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    Which is why you should use proper architecture in code too. Because the problems a bad architecture causes will only multiply the larger and more complex the code becomes until it becomes impossible to work with. You can get away with it when building small projects but if you want to be ambitious you're just shooting yourself in the foot.
     
    Last edited: Sep 28, 2022
    MadeFromPolygons likes this.
  12. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,519
    No, I've run into it a bunch of times. Working on an object, tweak a script, make a typo, switch back to Unity... it happens.

    And when I do make that mistake, which absolutely is a mistake, made by me (they happen!) I'm really glad that Unity gives me a shove in the right direction rather than letting me accidentally erase or corrupt valid data.

    Or, as spiney already said it before, I'm really glad that Unity doesn't let me accidentally step off a cliff.

    Here's an actual rule of programming: when fixing errors, start with the first one the compiler gives you.

    That's because it's super common for the first error to be either a the cause of many of the others, or a dependency for fixing them. And that's exactly what's happening here. The Editor can't serialize stuff because it needs validly compiled code to be able to do that. You're jumping ahead trying to do it anyway and then getting stroppy that it's not working, which it can't, because you're feeding it junk.

    Go to your console tab. Press "Clear", then scroll all the way to the top. What's the number next to the red (!) symbol at the top right? And what's the first error in the list?

    This is where you need to start fixing errors, and that's an actual thing that's taught to programmers. You can not jump ahead and expect things to work when they're built on top of errors, and that has nothing to do with Unity itself.

    - - -

    And with that in mind Unity's design here is definitely guiding us down the path of most effective action. If it let me save data based on junk code then it'd be letting me break my data, which just makes more work for me. Having it make me do stuff in the right order saves me work.
     
    Last edited: Sep 28, 2022
  13. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I don’t think think you people are actually understanding my meaning and you’re just gnashing at the bit over tiny little points in the conversation just looking for a chance to be right about something. If you can’t find a way to understand that there really is a problem here then just get out. I’m looking for people who are actually trying to understand what I’m trying to say here not a bunch of trolls.
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    It's not trolling to tell you you're wrong.
     
    MadeFromPolygons likes this.
  15. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    Thank you, Murgilod you’ve already been excused.
     
  16. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    You don't make the rules here, this is an open thread. The problem still comes down to the fact that you are incapable of seeing yourself as being wrong and also incapable of accepting the right way to do things. It's not just me who disagrees with you, but everyone who has posted about what's happening here in this thread. Nothing about what you are requesting is actually reasonable because you either refuse to do something like revert the changes made to the prefab to its default state or because you refuse to actually write manageable, portable code.
     
    MadeFromPolygons likes this.
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    Wow. I am getting some serious déjà vu from this sentence. I knew it was coming too because all of the signs that lead up to it were happening in previous posts.
     
    Last edited: Sep 28, 2022
    MadeFromPolygons likes this.
  18. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    in that GIF we saw wasn't it the invector player controller?

    I think what we have here is a noob who has a litany of third party assets doing stuff that they don't understand, and they thought unity was plug and play thing but it turns out it's not. They probably thought using the third party stuff was easy mode, but in fact, figuring out the issues with somebody elses code is probably more difficult than writing your own in a simple way that is appropriate for your current skillset.

    Well, let's suppose that everybody else is wrong and Jgamemaker is correct and unity is really dumb as a piece of software, at least in this regard. What then might happen? The billion dollar corporation, upon having their senior engineers and top decision makers read this thread are going to say, "ya know what, that kids right. We need to rethink fundamental processes in our engine. If something is broken, let them push snooze and deal with it later. That way the creative process won't be disrupted."

    The issue here is somebody who is currently too lazy to make games is refusing to come to terms with the fact that it is work. You will have to do work, even if you buy a bunch of assets. There is no way to get around the work, so you might as well learn how to enjoy it, or quit.

    Here is a roadblock you've identified, so how to get around it? Learn to decouple systems so that when you put things together in a test project, you can easily migrate back into your main project. Are you using version control at all? Probably not.

    The way you have described how you are working is like you are playing a game on hard mode that has infinite saves and you refuse to save at all. You walk through the minefield for hours, get blown up, then complain game is too hard. Everybody else is save scumming and not having any problem with the minefield.

    You can go try unreal blueprints which, IMO, is the easiest easy mode you can get (besides maybe game maker or w/e those tiny RPG makers are), but you still must know how to write decoupled code or otherwise face problems when migrating.

    It's not unity problem, it is lazy developer being a cry baby problem.
     
    Last edited: Sep 28, 2022
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    He's been working with PlayMaker. I wonder how much of his problems are due to that.
     
    Last edited: Sep 28, 2022
    MadeFromPolygons likes this.
  20. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I doubt there is an architecture at all. I think its a few plugins with some values tweaked and they're trying to mash it all together.

    Have we seen a single sentence to indicate they know anything about what they are doing at all? Have we seen a shred of interest in solving the actual problem?

    No, it's the type of person who clogs forums and other places with such low effort threads that it's just a disappointment to even visit. It's appropriate for reddit maybe, where it can quickly be buried by even lower effort post.

    At least a couple of the heros here have explained some of the under-the-hood workings on how this stuff works and why, so there's that. But clearly the OP is a lost cause and not worth the effort.
     
  21. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    Ya'll are rude. see yourselves out.
     
  22. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85


    Problem: Unable to save changes to a prefab during edit mode if there is a missing script.

    How to replicate this problem:
    Step 1: Create a Game Object in your hierarchy
    Step 2: Click add component and add a new script. Name it whatever you want.
    Step 3: Click add component and add another new script. Name it whatever you want.

    Note that this only happens where there is multiple missing script components

    Step 4: Turn that Game Object into a prefab by dragging it into your Project folder from the hierarchy
    Step 5: Delete the scripts that you made from your project files.
    Step 6: Go back into Prefab Mode and remove one of the missing script components. Leave the other one in there.

    Any other improvements you make during this time won't matter because it won't let you save until you fix the missing file reference.

    Step 7: Try to exit the Prefab Editor by pressing the back arrow at the upper left
    Step 8: Get told you are unable to save any of the changes you just made until you correct other problems within the Prefab.

    If you are unable to fix it you are out of luck. Any other changes you made to your prefab will be reverted too.

    You have to see why this is problematic. If you're working in a bigger project, where you have files that might have gone missing in a prefab that you're editing, sometimes you might not even see that you have missing file references while you're editing a prefab, but when you want to go and save the prefab it won't let you. Depending on how many missing files you have it can take a very long time to fix. It also restricts you from entering other parts of your project because you are stuck inside of the Prefab Editor mode.
     

    Attached Files:

  23. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    I'm still bamboozled at how you have so many missing script issues. What are you just deleting scripts willy-nilly?

    Only someone who hates themselves would delete scripts without first scrubbing the project clean of any usages.

    I hope to some kind of deity that you're using source control.
     
    Antypodish and Ryiah like this.
  24. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    763
    He copies a prefab from one project to another, so no scripts are found, and gets annoyed that unity doesn't let prefabs be saved. He's probably never heard of asset packages.
     
    JoNax97, Antypodish, xVergilx and 2 others like this.
  25. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,886

    Seriously just stop being obtuse about this and google "unity asset packages" and learn how to port things between projects properly, instead of doing it the wrong way and then complaining about your mistakes.

    I could maybe understand if there wasnt a way to do this, but there literally is and you are just choosing to ignore it - meaning this is your problem not unitys.

    There are plenty of real problems in unity - this is absolutely not one of them.

    Actually if you read the history of this thread, it is you who is being both rude and entitled. This is a thread you made on an open forum where you claim a bunch of incorrect things, then start getting aggresive / ignoring everyone who tells you that fact

    Why even come to post this if you are not going to actually learn from your mistakes and try the correct solutions?

    This forum is not for random rant posts where the OP is unwilling to listen to any help - rant about real issues if you must but for the love of sanity, dont just argue for the sake of argueing as you are here

    You messed up, you made a mistake. Own it and move on.
     
    Last edited: Sep 28, 2022
    Ryiah likes this.
  26. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    If you have this problem after years, it is time to hire a tutor, as you're wasting an insane amount of time right now and time is valuable.

    The alternative is a data loss.

    No, people are trying to explain that this doesn't have to be this way and there are better ways to work with the editor.
    So far you refuse to receive help and refuse to solve your problem, but continue complaining how bad things are. Which is not exactly logical.

    And you can't copy a prefab from one project to another, because scripts used by prefab are important. That's why you use asset imort/export for this sort of stuff.

    Also, start using version control.
     
  27. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    We all know the reason of the problem.
    The thing is, anyone having problem with prefabs, is usually a beginner user of Unity. Years of using Unity doesn't meant necessarily you become automatically experienced user.

    Here is what happens typically on the forum, when comes to problems like prefab.

    Person writes that has issue with prefab.
    We forum members asking for more details. Persson writes what type of assets and script is using. We usualy helping and pointing out on solving the problem. Typically the problem is solved and people move on. I don't know any prefab related threads which hasn't been resolved. They tend to be solved within few post. Yet here we yet running two pages already, going back in circles.

    This thread will be closed soon, as there is no point wasting developers times, if someone doesn't want to collaborate on own problem solving. At this point, this thread is nothing more but ranting.
     
    DragonCoder and Ryiah like this.
  28. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I am trying to explain a situation here and why it can be problematic in some circumstances and all you all are doing is trash talking me and my experience with Unity. None of your feedback has been helpful. Your solutions aren’t helpful. In fact, I’ve “ignored” most of the people that have been posting here in this thread and my explanations are much clearer without all of your yammering in between my posts. I am trying to discuss the Prefab Editor UI and how it is designed. Sure, there are obvious solutions and ways to avoid the problem but that’s not even the point. This forum could use a few less bullies.
     
  29. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    People are trying to explain what needs to be done for the problem to go away. You are not listening. No, that's not bullying.

    It would be interesting if you managed to finish your project, and every sign shows that you're struggling with it. You've been given explanations of how you can complete your project faster. You do not want to follow that advice.

    Trying to "bully" someone holds no appeal for most adults, by the way. And this is a forum mostly filled with adults.
     
    Ryiah likes this.
  30. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I know how to make the problem go away. It’s right there in the console. That’s not the point of the discussion.
     
  31. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    It literally is the point of the discussion because this is only happening because you refuse to fix your errors and general workflow and instead choose to blame the editor.
     
    Ryiah likes this.
  32. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    Sometimes you need to step back and look at the design of things as a whole and see which obstacles we are continually having to avoid on purpose.

    You’re editing a prefab, you lose a bunch of script references, you make additional changes to that prefab, you can’t save any of those changes, you have to frantically fix all of the missing script references in order to preserve any of the changes that you made, in order to even be able to get anywhere.
     
  33. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    You solve errors first. You don't make changes to a prefab before solving errors. You are effectively expecting code to compile while it still has errors in it, but it doesn't work like that.
     
  34. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    It is, as you shouldn't have ended in a situation where this thing happens in the first place.

    No, FIRST you fix the errors, then you can think about editing anything.
    Prefab with missing script is like a car on fire. When your car is on fire, that's not the time to start adding a new layer of spray paint to it.
     
  35. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    I love that this is coming from someone that is refusing to take that step backwards and re-evaluate their beliefs.
     
  36. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    There’s many ways one can end up in this situation and I’m saying anyone can wander into this. With the way the Prefab Editor is designed you can easily get trapped in this loop of not being able to save or being forced to discard changes. Even if all you’re doing is removing more of the missing script components, if you don’t get all of them removed right away on the first go, you’ll be forced to discard the ones you’ve already removed and the missing script components will be put back in your prefab.
     
  37. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    Alright, horses and water. You don't want to solve your situation, can't help you.
     
  38. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,185
    Earlier I had to perform some experiments to find out what the problem was and the reason that I had to do that is I have an understanding of how the editor works and why it works the way it does, and because of that I was simply avoiding all of the mistakes you made that led you into that situation.

    Yes, it is possible for someone to just wander into this situation, but the editor is telling you that you've done it and what you need to do to stop wandering into it. After that if you wander into it again that's largely your fault. You were told what you did and how not to do it but you did it again anyway.
     
    Last edited: Sep 28, 2022
  39. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    Like I’ve been saying.. the problem is with the way the Prefab Editor itself is designed. And I would really like to keep things in a general functionality sense.
     
  40. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    It really isn't.
     
  41. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    There are issues in some instances (such as prefab serialisation), but in this instance it's just your workflow processes and project management shooting yourself in the knee.

    You need to take a step back and review your processes.
     
  42. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    So what I’m really saying is the Prefab Editor is causing data loss. It’s especially vicious when transferring files between different projects. Be on the look out for it. And figure out a way to resolve it so the whole process is smoother.
     
  43. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    Lol, it's not. It's preventing you from doing so, as has been described ad nauseam. Don't move the goal posts.

    It's easy to move files from one project to another by exporting it as a package, which, again, has been addressed more times than one's sanity considers reasonable.
     
  44. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    85
    I wonder how hard you people will try to disagree with me lol. Have a little more thoughtful consideration and then we’ll talk about it
     
  45. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,802
    It's not causing data loss, you are.

    You are literally transferring prefabs between projects without the necessary data.
     
  46. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    On the flip side you've heeded exactly zero advice here, some of which has come from long time industry professionals.

    Good luck with your broken project I guess. We'll be here when you're actually willing to listen to good advice. Till then, ta~
     
  47. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,002
    Closed.
    Wrong forum.
    Questions have been answered multiple times.
    Entirely user error.
    Pointless arguing.
     
Thread Status:
Not open for further replies.