- Home /
The question is answered, right answer was accepted
Some controls have lost functionality after building
My unity project works perfectly in the unity view, but upon building and playing it, certain controls became very unresponsive; it could take anything from 1 to 20 presses of, say, the jump button to actually jump. Only some of the controls had this problem. Does anyone have an idea of the problem? The build output log says:
stopping
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
And it repeats this probably a few hundred times.
But I have no idea what that actually means. Other similar questions have the user claiming that the build output log solved their problem, but I'm not sure if this is the problem, or if it is, where I would find this code.
If desired I am willing to post the entirety, or at least a sample (seeing as the whole thing is unbearably long and just consists of three lines repeating themselves after the initial part) if it would help.
Help would be greatly appreciated, as I would feel terrible placing it in my portfolio when the game is complete but nearly unplayable.
are you using UNITY_EDITOR compiler directives in your code that make the code differ from the code in the build? What platform are you working on?
I am using them in one place, but only to test quitting the game when in unity editor. I also have normal quit code that works perfectly well; it's not the problem.
Answer by Impstar · Jun 25, 2017 at 12:43 AM
Okay, I've figured it out. I had all my input controls in FixedUpdate rather than Update, which was causing them to be super buggy. Once I moved those to Update, the problem went away.
Answer by IMemeManI · Jun 23, 2017 at 08:47 AM
It's stopping it because there's an error, that's the only reason it would do that, unless there's a Wizard around. You must have done something which cause the controlling script to function incorrectly. Have you modified it and made it so the player can only move once a certain perimeter has been met? e.g:
if(canWalk && Input.GetKey(KeyCode.W))
{
//Code here to walk.
}
Now the Player can only walk if "canWalk" is true, this is all theoretical ofcourse and might not be your problem but it's better to make sure it isn't.
Or maybe you've built it using the wrong settings? x64 or x86?
It's possible that I built it with the wrong settings, but I doubt the script is the problem. I would think that if the script was a problem, it would have also shown up in the unity editor (correct me if that's wrong).
I altered the architecture like you suggested (to x86_64, the only option other than x86) and while that did mess up the screen size and resolution (the scaling was weird), it did not fix the controls issue.
From some exa$$anonymous$$ation of similar issues, I feel that the most likely issue is with the building itself, but again the only thing in my build log that's suspicious I don't actually understand.