I’m sorry my missing scripts are offending you so much, but does this really must mean that we continue to halt development until all of these red errors are satisfied and dealt with? Why wouldn’t they just let me save and come back later and deal with it? Maybe it’s not the only thing in my project. It must be something truly awful if it can’t continue to function without my input. To tell me that saving is straight up “not allowed”???!
and continue to trap me here within the Prefab Edit Mode until I get this figured out? I feel like I’m being held hostage by the Prefab Editor.
Yep.
I wonder how you work with code? I mean you can’t just tell the compiler “ignore this syntax error I’ll fix it later” and it’ll be like “Ah, okay. I’ll just make an educated guess.”.
Fix the missing script. Or remove it from prefab.
The prefab should still be able to be saved even with errors… because sometimes you can’t even get them all at once. And if the prefab isn’t even in the scene then you should still be able to press Play. It’s just being an unnecessary pain.
Can’t exactly be done, because classes attached to the prefab determine what data should be saved. The variables you serialize are determined by the attached scripts. No scripts, no variables.
This is literally never how Unity has worked. If you have compile errors in a script you’re not using you can’t hit play either. Just fix your prefabs.
Think Unity actually gives you a chance here to restore the editor-set variables of those scripts that are missing. When you manage to fix the issue, they are restored from memory somewhere “sometimes”.
Of course they could alternatively just kick out / disable the invalid scripts with a warning, but well, they decided against that.
Btw. do we need a “Venting about Unity” thread for cases like those?
Because that would be highly likely to lose data, regularly.
Stuff which is marked “Missing” still has data attached to it which was saved before it went missing. That data can no longer be worked with because the metadata (which is a part of the compiled code) isn’t there to know how to serialize it again. In other words, if it did let you save then anything “missing” would probably deleted, reset to a default / empty state, or corrupted.
Compile errors are everyday mistakes, so it’d be really bad if Unity didn’t prevent them from losing serialised data. And that error needs to be fixed anyway. So it makes a lot of sense to get you to either fix the error now (usually only takes a few seconds once you’re in the swing of things) so you can continue working with the existing data, or explicitly delete the component (indicating that it’s “missing” because you didn’t want it anyway).
No, rule number one of programming is you don’t interrupt the navigator from where they’re trying to go. It’s putting the creative process in a colossal arm lock until problems get fixed and it’s also slowing down process. Most of the time the error occurs from trying to import things from one project into another and I can’t fix any of them if it won’t let me out of the Prefab Editor to see my project as a whole. I wouldn’t be so quick to make excuses for their bad logic. They designed it that way on purpose, but it’s making things more of a struggle
Absolutely! They need better threads on here. I’m sure people have LOTS to complain about.
If someone is about navigate themselves off a cliff, one would imagine you try to stop them.
Plenty of good reasons why it is the way it is have been explained. Some rambling rhetoric doesn’t really override that.
Just remove the component or assign it the correct script asset and move on.
It’s never just one component and you know that. It’s a big tangled mess of interconnected assets, if your project ever gets anywhere off the ground. Being stuck in the Prefab Editor isn’t helping anyone. There could still be ways of solving the errors without locking the users inside of the Prefab Editor interface without being able to save! What if I fixed a few of the errors and want to save the prefab and come back later and fix the rest? It doesn’t let me. Also this is a forum so these are the things we talk about.
Thing is nobody else really complains about this because its a trivial issue to solve. Just fix your problems instead of ranting and arguing here
I don’t know that, sorry. I’ve never even encountered this functionality of the editor, and I seldom if ever have missing script issues.
It honestly sounds like your project could do with some better organisation.
Also why do you are you putting quotes after your responses?
Why do you have so many missing script and compilation errors anyway?
Not really.
The number 1 rule is to give navigator enough tools to prevent himself from doing something stupid.
There’s a reason why strongly typed languages exist, and why you can’t directly assign a string to an int in C#.
That sounds like a fundamental design problem in this particular project, to be honest.
Also, as a rule of the thumb, in unity project you never work on prefabs while there are still compile errors.
Also the reason why you can’t hit play with compile errors is because C# is not an interpreted language. For the game to run, it has to build a library or a dll. And a dll cannot be built when there are compile errors.
It is not. It is also not a rule of interactive design, or design in general. To the contrary, thoughtful constraints are often considered to be highly effective design, and a lack of them is often confusing or error prone.
Script errors don’t require you to leave the prefab editor. You need to fix the code, which is typically in a separate application, e.g. Visual Studio.
[quote=“JGameMaker92, post:12, topic: 895060, username:JGameMaker92”]
It’s never just one component and you know that. It’s a big tangled mess of interconnected assets, if your project ever gets anywhere off the ground.
[/quote]If you solve them when they appear then you won’t reach this point.
You mentioned importing stuff, so suggestion number one there is to make sure it compiles in the target Unity version before you import it with other stuff. Only after everything works individually do you add one more at a time, fixing each integration compile error as you go.
Number two is that if there really are a huge number of compile errors, I’d be reconsidering what’s going on and solving the underlying cause. We’ve no info on the cause, so can’t suggest where to start with that. For example, if the packages do work individually, what is causing incompatibilities when integrated?
In any case, the Prefab Editor issues are a symptom. The problem is broader, and you need to address the cause. Even if you could change things as you desire, it’d just blow up more somewhere else.
if you want to work fast and not get hung up on details like this, try visual scripting. It’s more user friendly.
Maybe this is a complex user case that many of you haven’t had a chance to run into yet, and I’m sorry I haven’t done the best job of explaining the full situation yet, but when trying to import your prefabs from other projects into a new project where you are often missing a large amount of dependent files, this makes it a world of pain. Obviously I’m not denying that compiler errors need to be dealt with, what I’m saying is that it would be much easier if it didn’t trap me in the Prefab Editor until they get sorted out.
Doubtful, but if it is the case that there is a problem you need to (a) determine the steps that cause the problem to appear, and (b) submit a bug report with that information. Creating multiple threads saying how you believe things should be is not going to solve your problems.