Cant drag my prefabs into an Array List

Hi there

Just started created my array list in the script and i cant drag and drop my prefabs into the array list.

I have no failure in the Script and i am using Unity 2022.2.1f1.

Any ideas maybe what can cause the problem?


8669037--1167657--script.png

Is Block a component on the root of these prefabs?

1 Like

I have and empty called “Board” - attached with an Board script

Inside the Assets - Scripts - Board script an Array Declaration called Block

The prefabs are sitting inside the Assets - Prefab - Blocks folder

and i want to fill these arrays to go to the next step to spawn them in the script but i cant add them.

Well, you can only drag these prefabs onto your array of Block if Block happens to be a component on the root game object of these prefabs. If not, then you need to fix that.

2 Likes

Thank you for the fast response. I found the problem the script was not attached to the prefab so it didn’t let me drop into the array. Just recently came back to unity from another engine and some basic things still missing or I mix up.

1 Like