Endless runner with pre-made rooms that spawn randomly

I couldn’t come up with nothing better than creating rooms with some number attached to it and a random number generator that will make obj spawners on the right side beyond the screen to create their objects that will move to the left with a certain pattern.

But I feel like this is going to be frustrating to make. Is there a better way to do this?

You could creat generic rooms(if 3d) with spawn points for other objects. Have a manager script hold all the prefabs which give it that number you want , randomly spawn one setting and unit function in the prefab that will randomly choose if a objects spawn at that spawn point. Less work more random

Just make that objects created at right are being destroyed after 2-5 sec? how long they will longest appear on screen.
as hicksy said. Create one type of terrain, enemy, bonus, whatever and save it as prefab and randomly instantiate when player gets to next set of enemies, obstacles … as for spawner, you can use empty gameobject with script that checks distance between the gameobject and player (vector3.distance) and when it is close enough spawn set of something and move for (10,20… x so right) and wait again for player.

all this can be set to spawn according to playtime or level or something