Something does not work when I build the game

Hi there!
I have a problem that is really buttering me. I have a door that can be open by clicking “mouse 0” when a raycast that comes from the center of the camera is in contact with the door, that turns a bool parameter on the animator and make the door open, simple. The thing is that when I build the game and try it, the door wont open. If I select build and run I can open the door, the problem is only when I simply build the game and execute it from desktop or something. I just want to know if is something “common” and with easy fix so thats why I didnt put any code, buuuut if someone is really curious about it you can check the project here: GitHub - Mutuerz/Angate: This is a Gone Home like story game
I really apreciate any help. Thanks!

If it behaves differently in a build than in the editor, the first place you should look is in the player logs (not the editor logs, the logs generated when the standalone build is run). There may be a null reference error or something else wrong called out in the logs that is not happening in the editor.

1 Like

Oh I see, I was looking through the file but didnt found any error or null reference, is there any other mistake I should look onto?

Okay maybe I can see the problem, I am modifiying a boolean like this:

Declare:
GlobalEvents Global;
On start:
Global = GlobalEvents.GetComponent();
On update:
Global.PowerOn = true;

then I try to print this on scree
logs.text = Global.PowerOn.ToString();

PowerOn is still false

Is nothing about public variables or null reference, because this work perfeclty on editor

this is on GlobalEvents Class:
public bool PowerOn=false;

Its fine, I found the problem, my bad I was reading a file so… after build the direction doesnt work