- Home /
Transform bug only happening in Compiled build
Hey guys,
would really appreciate some advice on this. I have the following code for teleporting to another room and taking a step forward; _NewLocation = new Vector2(19,97); _TargetPosition = _NewLocation + -Vector2.up; GameObject.Find ("Player").transform.position = _NewLocation; GameObject.Find ("Player").transform.position = Vector2.MoveTowards (GameObject.Find ("Player").transform.position,_TargetPosition,3.5f * Time.deltaTime);
when run from the editor it does what its told. But upon FIRST Build & Run the player at first does not teleport to new location but instead is dragged by the MoveToward all the way across the screen to the target location. You can close the game and without re-building it, run it and the problem is gone. However on another machine, the problem does not go away at all, even after Re-Build.
Your thoughts gentlemen? And thanks for any responders in advance.
Paul.
Your answer
Follow this Question
Related Questions
Compiling errors help? 0 Answers
unable to find a suitable compiler for sources with extension 'dll' 3 Answers
Compile error when add any C# empty script file 0 Answers
Error building Player because scripts had compiler errors 1 Answer
I am trying to make an aim down the sight code but i keep getting errors? 1 Answer