Legacy Text Type Mismatch

So, I have a prefab called Arrow and it has a c# script attached to it called ArrowScript. And ArrowScript has a public text variable: public Text hpText;. And when i dragndrop the text into the box, it shows a red circle. I tried adding it by pressing the white dot and selecting it, but then it just says type mismatch. Ive researched that in the web but nothing worked. Can I please get a clear explanation why it might not work? Im pretty new to unity/c# so sorry if its an obvious question

Please don’t use the 2D tag unless you’re asking about 2D features as this puts your question in the 2D product area. Text isn’t a 2D feature

Please use tags to indicate the feature you’re asking about.

I’lll remove that tag.

Thanks.

1 Like

Are you trying to drag a scene component onto a prefab? Scene objects cannot reference assets (not reference across scenes).

Or you are using the wrong text component, such as a TMPro text component.