Quantcast
Viewing all articles
Browse latest Browse all 2891

Where to find problem: UnityException: DestroyImmediate can only be called from the main thread.

I have this coming up in the console, but clicking on it doesn't highlight an object in the scene, nor is there any reference to my code, only to Unity code. How do I find where this problem is coming from, it's happening multiple times per frame, constantly: > UnityException: DestroyImmediate can> only be called from the main thread.> Constructors and field initializers> will be executed from the loading> thread when loading a scene. Don't use> this function in the constructor or> field initializers, instead move> initialization code to the Awake or> Start function.> UnityEngine.Object.DestroyImmediate> (UnityEngine.Object obj) (at> /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:322)> UnityEditor.NormalCurveRenderer.FlushCache> () (at> /Users/builduser/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveRenderer/NormalCurveRenderer.cs:649)> UnityEditor.CurveWrapper.Finalize ()> (at> /Users/builduser/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveEditor.cs:54)> UnityEngine.UnhandledExceptionHandler:m__0(Object,> UnhandledExceptionEventArgs)

Viewing all articles
Browse latest Browse all 2891

Trending Articles