what is this eror for Thread::CurrentThreadIsMainThread()

Opened Project up and now I have this in the Console
Thread::CurrentThreadIsMainThread()

If any one knows what this is and how to go about fixing it this just might fix why my webplayer doesn’t work like my editor and standalone.

EDIT:
– part of Thread::CurrentThreadIsMainThread()
Assert in file: C:/Buildagent/work/6bc5f79e0a4296d6/Editor/Src/SceneInspector.cpp at line: 218

If I double click on Thread::CurrentThreadIsMainThread() I get

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ListViewShared.HasMouseDown (UnityEditor.InternalListViewState ilvState, Rect r, Int32 button) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:180)
UnityEditor.ListViewShared.HasMouseDown (UnityEditor.InternalListViewState ilvState, Rect r) (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:175)
UnityEditor.ListViewShared+ListViewElementsEnumerator.MoveNext () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs:368)
UnityEditor.ConsoleWindow.OnGUI () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/ConsoleWindow.cs:422)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)

with
Log in file: C:/Buildagent/work/6bc5f79e0a4296d6/Editor/Mono/GUI/ListViewShared.cs at line: 180

Bumping because i would like to know what this is as well (and also to have an answer available for those that might search for it in the future.)

Are you using Threads, or using Constructors/Desctuctors on monoBehaviours?

Constructors in this case will refer to setting a variable to some sort of default value, using an external function as well, i.e. int x = Screen.width; where x is a class variable.

as far as i can tell with some googling i’m apparently using constructors (no idea about destructors though.)

granted, i’m still a newb when it comes to programming and i’m merely following the bergzerg hack-n-slash tutorial (i’m at the point where i’m creating the character classes… tutorial number 12 is when it showed up.)

Monobehaviours can’t have Constructors.
The reason for this is that in Editor, to fill up the Inspector they get created/destroyed on a separate editor thread. This causes Unity threading issues primarily, but will also cause more strange issues because you can’t reference singletons or some static variables, as the object is being created completely out of the game flow.

Replace your constructors with Awake(). And if you need to pass variables, you can use start, so that you create your object, set the variables and then start will use what you set.

but, why would it be accessing monobehavior in a c# script if the monobehavior is told not to be included? (using c# btw… and the tutorials have led me to not include it.)

to be fair, this didn’t happen until the recent update… and the tutorials don’t show this error in the debug console… so, i’m kinda at a loss as to what’s happening (though i’m trying my best to learn.)

Describe “Told not to be Included”. It is #defined out, is it just disabled, is it just not attached to anything?
It’s accessing them for data to fill up the inspector, and potentially a few other uses, but the rule is don’t put functions/other classes properties as default values for variables, and use Awake()/Start() instead of a Constructor when using MonoBehaviours. (For everything else Constructors are fine)

i’ll give it a try but i don’t know if it’s going to help… but i’ll also include the link to the tutorial i’m following. (http://youtu.be/li6ha2d8Arw - this is part one of seven but i don’t think it’s nessessary to include all seven tutorials.)

with the “told not to be included” from what i understand of what i’m reading about this sort of programming in C# is that it will not include monobehavior unless it is explicitly told to do so (such as you’d find in the “public class NewBehaviourScript : MonoBehaviour” but when removing the “: MonoBehavior” bit it’s afaik supposed to not include those behaviors or use those.

maybe check out the tutorial videos as those are what i’m following so it might give you a better idea of what i’m trying to mean… and yeah, i’m typing it out letter for letter as i follow the tutorial videos but the “SceneInspector.cpp” at line 218 is where the error is pointing to… so, i’m still scratching my head trying to understand this