Cannot set MonoBehaviour in Inspector

I’m sorry if this is somewhat vague, but I’m having hard time finding the correct terms for these features.

When I have a class with a public variable of type MonoBehaviour…

public MonoBehaviour InsertMonoHere;

…I’m under the impression that it’s possible to either drag and drop a MonoBehaviour script to the variable in the Inspector, or click it and select it from the “Select MonoBehaviour” window that opens.

But the window shows zero assets (I do believe I have a few dozen MonoBehaviour classes in my project) and drag and drop doesn’t work either.

Same situation when working with the Zenject library. The documentation tells me to select the MonoInstaller classes to run on boot, but the window shows zero selectable classes, even when there’s one error-free right next to it. Whole project compiles happily otherwise.

This works if I want to refer to a prefab or other asset type (both drag-and-drop and selecting from the opened window) but when I need to refer to individual scripts, it just doesn’t work the way I understand it should.

I just don’t know if this is normal behaviour for Unity, is it a glitch somewhere or am I doing something wrong.

Edit:
Screenshot

http://imgur.com/WQ18Ftb

I am having the same issue, but I found a solution. When you go into the Inspector Window and double-click the MonoBehavior public variable, a list of gameObjects will appear. When you click on one of these gameObjects, the FIRST component attached is the one actually selected to the variable.
So go into the object with the MonoBehavior you want, drag it to the top of the list of that gameObject’s components in the Inspector, THEN select this gameObject through the public MonoBehavior variable in the other script, and the MonoBehavior will automatically be selected. Hope this helped :slight_smile:

Same problem here (Unity 2017.1 on Windows). Docs and forums on the internet (e.g. this: https://forum.unity3d.com/threads/referencing-a-script-on-a-gameobject-in-a-monobehaviour-in-another-gameobject.97583/ ) hints that this is possible, but when dragging a component over my script’s MonoBehaviour field, nothing happens.

Opening its picker window (“Select MonoBehaviour”) only shows GameObjects, not components.

Interestingly, adding a public GameObject foo field shows another picker window, with all the objects in the scene, why the the MonoBehaviour picker window don’t show the object where my script is.