Jump to content
Unity Insider Forum

Unity hangs completely when I start a script


Blazer

Recommended Posts

I highly doubt that. The behavior you described is caused by an endless loop, which has to be coded somewhere. And it'as rather unlikely that it's a Unity issue that noone else has discovered. So if it's not your custom code, then there's some Plugin involved that you added to the project.

Link zu diesem Kommentar
Auf anderen Seiten teilen

If i delete Unity and reinstall it. Then it might help, I don`t have any plugins and the code are simple arrays or methods. The code always just has on of it at a time since I try to learn coding but it doesn`t matter if I replace the code with sth. else. But it`s always simple. 

If I knew where the Project would be safed, it would be maybe helful to reinstall unity

Link zu diesem Kommentar
Auf anderen Seiten teilen

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DummyScript : MonoBehaviour
{
    private Rigidbody rigidbody;

    void Start()
    {
        rigidbody = GetComponent<Rigidbody>();
        
    }

    private void OnMouseEnter()
    {
        rigidbody.AddForce(new Vector3(0, 10, 0), ForceMode.Impulse);
    }
    void Update()
    {
        
    }
}

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

A new preject works! The old one isn`t important since there was just some test code on it. But it could be that I once removed a component of the cube that I had in the Scene. But I don`t know if I deleted a wrong on.  But I don`t think this would lead to this freezing problem

Link zu diesem Kommentar
Auf anderen Seiten teilen

Archiviert

Dieses Thema ist jetzt archiviert und für weitere Antworten gesperrt.

×
×
  • Neu erstellen...