9
Answers

Looping Through Image Resources

Jay Webster

Jay Webster

13y
6.1k
1
Hi everyone,

I have the following images in my resources:
land_grass
land_path
building_home
building_castle

I have 2 dropdown boxes, the first is for land images and the second is for building images.

I am looking for a way to loop through all the images in my resources, if the image filename starts with land_ it gets added to the land dropdown if it starts with building_ it goes into the building dropdown. if it starts with anything else it can be ignored.

I am having trouble figuring out how to iterate through the images my resources.

Could someone show me an example or link me to a good reference on how I would go about doing this.

Thanks

Jay
Answers (9)