Cant drag InputField to property of script in Inspector

I am pretty new to Unity, so please forgive me if its a basic question (i am sure it is, in fact…)

I have some InputFields, an empty GameObject that has a script attached to it, which handles the behaviour of the scene (there are buttons, and so on). I have some fields in the script (public InputField if1, if2, etc.).

My plan is to drag the InputFields to the properties in the inspector so I can access them in code when certain buttons are pressed…but I cant drag and drop them. I see a black circle when I have the InputField (dragged from the hierarchy) over the field of the script, in the inspector.

Is this the proper way of doing it? How can I drag my InputFields to the proper place in the Inspector?

Thank you.

I’ve found the answer for myself. Its because I was using TextMesh Pro input fields. To resolve the issue change your InputField data type to TMP_InputField. You can only do this if you are using the TMPro namespace.

In fact,there is an alternative and you needn’t to drag. Click the little circle at bar of your varible in the inpspector [162595-ekran-alıntısı.png|162595]and pick the object you wish.

By the way, I do not think it is about assiging. It may be a bug or something in the scirpt causes it. Hope that helps.