samedi 28 septembre 2019

In Unity, how to find the type of a missing script?

a few of my objects now have 'missing' scripts on them, and I can't remember which script they once were.

I can't just delete them because I don't want to lose their the fields. I don't know why, but according to my experience, the invalid scripts may still remember its public field values. If I find the correct script type, the fields will come back.

I find an article about this but still don't understand:

How do I programmatically find name of missing script?

He uses Component.GetType(), but the missing scripts are null. I can't use GetType() of a null, is it? But someone says that article solves the problem. I am sure I missed something.

I really hope to find their types, or at least some hints, like public fields.





Aucun commentaire:

Enregistrer un commentaire