ScriptableObject not working after build

Following this lecture, I changed the properties of the ScriptableObject Weapon class to distinguish between left hand and right hand grip transforms, having a “gripLeftHandTransform” and a “gripRightHandTransform”, instead of just having a “gripTransform”

As it turned out, everything was going smoothly inside the Unity editor, but both the builds for Mac and Windows started behaving strangely. It was as if the player “Weapon In Use Left” and “Weapon In Use Right” properties had been left blank or set to null.

Deleting the old ScriptableObject Weapon class and creating a new one, from fresh, with all the required properties, solved the problem. Maybe there’s a quicker way to solve this problem, but that did it for me.

Privacy & Terms