I have a GameObject with a ScriptableObject on it, stats. It works fine in editor but when I try to build I get a message,

A script behaviour (script unknown or not yet loaded) has a different serialization layout when loading.

What is wrong here?


It turns out, I had changed the ScriptableObject (added a new property) after I'd already created the .asset file.

Going to the .asset file and re-setting the Script component fixed this. Making a new one would also work.


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.