Hi Everyone,
I’m getting this error and cannot figure out why, double-clicking the error in the console does nothing and the stack trace has none of my scripts in.
InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
UnityEngine.Object.EnsureRunningOnMainThread () (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
UnityEngine.Object.GetInstanceID () (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
UnityEngine.Object.op_Inequality (UnityEngine.Object x, UnityEngine.Object y) (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.ApplyInset (UnityEngine.UIElements.MeshBuilderNative+NativeRectParams& rectParams, UnityEngine.Texture tex) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.DrawRectangle (UnityEngine.UIElements.UnsafeMeshGenerationNode node, UnityEngine.UIElements.MeshBuilderNative+NativeRectParams& rectParams, UnityEngine.Texture tex) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
UnityEngine.UIElements.UIR.MeshGenerator+TessellationJob.Execute (System.Int32 i) (at <657b8300aeb24adfa77d48e89b1aaa3e>:0)
Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <1d617c9e1e974eb8b6639b2f0152e944>:0)
As far as I’m aware I’m not using the Job system at all, the last thing I worked on was a UI class but doing the same things I’ve done in other classes no problem. This also doesn’t break anything in any way but it’s getting very frustrating to see it pop-up all the time. Any direction would be appreciated!