- Home /
I get this error after completing my build
the build is working fine but still getting this error.
Answer by SynergyStudios · Aug 06, 2018 at 06:21 PM
when you press play, check the player's transform. does he fly away at warp-speed? also, check your EditorApplication.cs, line 91 at Editor/Mono/EditorApplication.cs in your assets. i could be wrong, but you might find an error... :)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Accelerometer : $$anonymous$$onoBehaviour {
private Rigidbody2D rb2d;
public float speed;
private void Start()
{
rb2d = GetComponent<Rigidbody2D>();
}
private void FixedUpdate()
{
float x = Input.acceleration.x;
float y = Input.acceleration.y;
rb2d.velocity = new Vector3(x * speed * Time.deltaTime , y * speed * Time.deltaTime);
}
}
This is my code here!
thank you for your response , my player does not fly away at warp speed and there is no line 91 in my code.
If at all possible, you should stay away from FixedUpdate. it may cause you to skip frames.
also, i don't think you can use a Rigidbody2D ane a Vector3 together.
thank you again found out my editor had some problems, I deleted and created new script again it didn't show any errors.
Your answer
![](https://koobas.hobune.stream/wayback/20220612172309im_/https://answers.unity.com/themes/thub/images/avi.jpg)