I am having a problem. Whenever I press the play button on the Unity Editor It freezes my whole program. I have to go to the Windows Task Manager and End Task it. Does anyone know why that happens and how to fix it?
Also I am running windows 7 64 bit edition if that will help.
This was a pure accident but I have found what hangs my Unity Editor. It hangs when my player settings are set to Android. When it hung I turned on my task manager to end task it but the tab was processes. I noticed that I had like 20 adb.exe running (one for each time it hung). I started deleting them and like magic the play button works.
So my answer is (only for ANDROID so far) If your unity editor hangs, check your task manager and delete all your adb.exe this should allow it to continue to function.
It is possible that it has nothing with your computer. Check if you haven’t some exceptions, objects have references to scripts, etc. I had the same problem.
public int maxPlatform = 20;
public GameObject platForm;
public float horizontalMax=14f;
public float horizontalMin=6.5f;
public float verticalMax=6f;
public float verticalMin=-6f;
private Vector2 originPosition;
// Use this for initialization
void Start ()
{
originPosition = transform.position;
spawn();
}
// Update is called once per frame
void Update ()
{
}
void spawn()
{
for (int i = 0; i < maxPlatform; i++)
{
Vector2 randomPosition=originPosition+ new Vector2 (Random.Range(horizontalMin,horizontalMax),Random.Range(verticalMin,verticalMax));
Instantiate(platForm, randomPosition, Quaternion.identity);
originPosition = randomPosition;
}
}