- Home /
Line cast doesn't work once game is built.
I've encountered a weird issue where Physics2D.LinecastAll stops working when I actually build the game.
I use a linecast to check if an enemy has reached a wall, if it has, it will turn around and patrol the opposite direction. I also use a linecast to detect if the player is close enough to an enemy to perform a melee takedown.
Both of these linecast checks work when the game is running in the inspector. But once I build the game, the enemy ai will run straight into the wall, and the player is unable to perform a melee takedown. Meaning, the linecasts are not working.
Does anyone know how to fix this issue?
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Unity 2018.1 Stuck In Loop 1 Answer
Moving objects bug on game build (on other computers) 1 Answer
Odd behavior changing another script's variable via coroutine 0 Answers
Beta version build problem 0 Answers