How to dynamically place images/sprites
I'm making a 2D side-scroller that is set on a city street. Player is walking in front of many buildings, all different. I want to generate a random/unique city street each time, and already have a few dozen images to use for the buildings. All the images are of differing sizes, or this would be simpler (I think?).
My plan was to randomly select an image, find it's bounds and size, and place it in the scene (insert magic here) at the correct location. And then the next image is selected and placed in the scene beside the first image, at the correct coordinates, and so on. I'm sure there is either a better way of doing this, or some math wizardry I'm not aware of to do what I need, but I am stumped.
It's hard to even search the net for a solution, since it's hard to describe exactly what I need. Apologies in advance if I haven't done a good enough job of explaining what I need!
Any help is greatly appreciated!
Your answer
Follow this Question
Related Questions
Help with Zelda type health bar! 0 Answers
I am trying to make my sprite show up as an image from a card database. 1 Answer
Questions about building a simple 2d image carousel 0 Answers
Shader Graph - Inherit from Sprite Renderer or Image Component 0 Answers
Decreasing PNG image size result increasing in edges artifacts 0 Answers