-1
\$\begingroup\$

I have a MonoBehaviour class in a compiled DLL that I have included in my Unity project. It automatically serializes public field data as expected. However, whenever I update the dll (by overwriting the existing dll) all my serialized data for the MonoBehaviour scripts are lost and the values revert to default.

1) Is this expected behavior? 2) How do I avoid this result and maintain serialized data through a dll update.

\$\endgroup\$
  • \$\begingroup\$ I'm down-voting this question because the problem isn't reproducible from the given description. In future, please try to reproduce the problem using only the description you're posting in your question, to verify that you've provided a Minimal Complete Verifiable Example that others can debug. This will help you spot problems like the class renaming that only you have the information & history to identify. \$\endgroup\$ – DMGregory Sep 26 '18 at 12:06
1
\$\begingroup\$

Solved. The issue was that I had renamed the class and in doing so, it provides a missing script error and dumps the data. Since my editor automatically adds the required script I did not notice this until further testing.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Please mark the question as solved. \$\endgroup\$ – KevLoughrey May 29 '18 at 6:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.