Can't drag slider onto inspector

Hello.

Currently, dragging a GameObject with a Slider component onto a public Slider array variable in the inspector yields no results. That is, I’m able to drag & drop, but the array elements still apear as “None (Slider)”. Doing GetComponentInChildren() (the object that contains this script is a parent of the slider) also does nothing - I get a NullReferenceException. The script with the array variable is using UnityEngine.UI.

Doing this on a new project works just fine. What could I have done that broke this?

Thank you for your time.

i would say you have created a custom class called Slider that is overriding the UnitEngine slider, in yuour script try creating the array like this

public UnityEngine.UI.Slider[] sliders;