Game view behaving different than the built game
In my game I have an enemy that when you stand close enough, it charges an attack and hits you which knocks you back. When I'm using the game view in the engine everything works just fine and you're knocked back a small distance backwards and upwards. But when I build the game and run it, sometimes the knock back only knocks you upwards and I'm not able to replicate this in the game view. Is there something that would cause the actual build of the game to be different than how it is in the game view?
Answer by Cuttlas-U · Dec 09, 2019 at 09:04 AM
are you using physics? is so you should know that physics can be different in multiple platforms or even with the build ,
check if every thing you are doing is according to the unity Documenation like u should use physics code in FixedUpdate and u should use Time.FixeddeltaTime etc ...
Thanks I think that fixed the issue! I was adding the force in a separate function ins$$anonymous$$d of in FixedUpdate. But also what is the difference between Time.deltaTime and Time.fixedDeltaTime because in the Unity documentation of Time.fixedDeltaTime it says that the normal Time.deltaTime will automatically return the right value if it's in Update or FixedUpdate
Your answer
Follow this Question
Related Questions
Building my Game, the Post Processing DOES NOT SHOW UP 1 Answer
Build Achievement system not working 1 Answer
How do i create a sprite sheet animation by script without the UnityEditor classes 0 Answers
Building/exporting game to windows 1 Answer
Game works using "Build and Run" but not when just using "Build 0 Answers