How do I get the properties on missing Mono scripts?

I posted this also in Scripting, sorry for the cross-post, but it’s sort of a Support issue I think too:

I have some objects who, in the inspector, say ‘Missing (Mono Script)’. I know how to find those with code. My question is, what code would I use to read those fields that are showing up in the Inspector? I mean, the script is missing, but those public vars are still there, and in my case, still contain valuable data which I would like to recover programatically.

Would this require Reflection, if so, is that field, property, member, what? (A bit new to .NET myself). The component is null, so I don’t seem to be able to get properties on it. Where are those things stored, how can they be accessed?

if it says missing it is not showing up anything. what you see there is the echo from the cached object but if you tried to build or use them in any way it would be gone / lead to an error.

you need to apply the correct script component first again before you can access it

That’s the trick. I was hoping to determine which script it was by the parameter list, so I could auto-repair them.

What about getting the name of the prefab it was attached to? If I haven’t renamed it, it’s obvious, but in many cases, I have renamed it. Is there something like EditorUtility.GetPrefabType() that would give me the original name of the original prefab?

Can’t say if that would work.

that being said it should not be a regular problem cause it is your chance to ever see your project built and working goes towards 0

should it come from syncing stuff between places / projects incorrectly: use packages, the will transfer the relationships

This condition I’m in was the result of using packages. The assets came no problem. The scene itself was hosed.

I don’t know, maybe my question should be: What’s the best way to transfer Scene objects between projects, and what to avoid?

If you’re working a team. This probably isn’t the best way, but it’s sure to work, lol…export your entire package with dependencies, and send entire projects back and forth. It’s sure to be time consuming and cumbersome, but you’ll be sure to get every folder, and item in the right place.