- Home /
Game doesn't play the same after building then in the editor
My problem is I have a player controller script with a boolean that the player can move. This determines if the play can move or not. When they press the inventory key, it opens up the inventory. When opening the inventory, it sets that boolean to false. In the editor this works fine, the player can't move while in the inventory. However, when I build the player can move while in the inventory. Why does it work in the editor, but not when I build the game? Any feedback is helpful, thanks for reading!
Answer by $$anonymous$$ · Nov 18, 2019 at 05:29 AM
make developer build and check if it still happens
ctrl+shift+b
tick developer build
Hey, thank you very much. This helped debug the issue and resolve the entire problem. It was that in the editor it was finding a reference to the crosshair, but when I actually built the game, it had a null reference. Again, thank you for bringing this feature to my attention, it really helped and I am sure it will help with bugs in the future. Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612214934im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Built project, now scripts are missing. 2 Answers
Panel GameObject not activating 0 Answers
physics.OverlapSphere colliders 1 Answer
Panel GameObject not activating when called from another script 1 Answer