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?

share|improve this question

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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