- Home /
Is there a way to drag and drop a folder into an array?
Is there a way to drag and drop a folder into an array and have it drop all items of the array's type into the array? I don't want to use "Resource" to load a folder if I don't have to...
Answer by Bunny83 · Nov 19, 2013 at 01:38 AM
No, you can't drag and drop a folder, but you can drag multiple assets at the same time. To do this you have to select the GameObject that has the public array and lock the inspector.
Now you can select all assets you want to add to the array (hold ctrl down). Now simply drag the assets onto the array. Don't drop them in an array element, you have to drop them on the array itself. Unity will expand the array and add the items at the end.
Ok. I remember now using that a long time ago. Not the most convenient, but better than dragging 50 textures into an array...
Your answer
Follow this Question
Related Questions
How do i load entire folders into arrays? 2 Answers
Add prefabs from a folder to array as GameObject 2 Answers
Save image to resource and display 1 Answer
Unable to Drag and Drop Folder/Assets into "Project" editor window. 2 Answers
Drag and drop files from the assets folder to another folder not working 0 Answers