City Generator

WEBSITE: http://wireddevelopments.com/citygenerator/
ASSET STORE: Unity Asset Store - The Best Assets for Game Making
WEBPLAYER: http://wireddevelopments.com/citygenerator/demo.php
MOBILE (Android) DEMO: http://wireddevelopments.com/citygenerator/demo.php
SCREENSHOTS: See post below.

This super simple city block generator allows you to spawn any size city you wish, using your own assets … IN SECONDS!

Think how long it would take you to create 50 city blocks in Unity. You’d have to place every single individual unique building, tree, rock,bin, fence, light post, bus stop, fire hydrant… the list goes on and on!

Well as long as you have the art, City Generator simplifies all the hard work for you. Just put all your prefabs in a folder, set the city size options then press the Generate City button… INSTANT CITY!

City Generator and Road & Traffic System now working together with the click of the “Generate City” button!


This video shows City Generator + Road & Traffic System working together… the City Generator detailed video is below.

Works great with our other package “ROAD & TRAFFIC SYSTEM”, check this package out here: http://wireddevelopments.com/trafficsystem/

The hardcore details are below but watch the video if you don’t like to read :slight_smile:

Below explains this super simple city block generator in full detail.
Be sure to watch the video to see City Generator in action!

How to use the City Generator system

  • Drop the “CityGenerator” prefab into your scene.
  • Set your city “Width” and “Height” to determine how big your generated city needs to be. Then set the “Ground Position” (default is zero).
  • Set your city “Block Width” min and max. This determines how many buildings (objects) are placed before a street space is added.
  • Set your “Street Width” to determine the width of your streets.
  • Drop all your prefab objects into the “City Generator/Prefabs/Active” folder so the system knows what objects to use when generating your city.
  • Add the “CityGeneratorAsset.cs” script to all your prefabs you want to use in the City Generator system. This can be down in one step by selecting all your prefabs and adding the component in the Inspector.
  • Use Clear Zones to stop certain areas having objects spawn in them.

Additional Options

  • Adjust the frequency of how often each object should be generated by assign each object a LOW, MEDIUM or HIGH status in their “CityGeneratorAsset.cs”.
  • Easily determine the ground position for each object as the pivot point might not be at the base of the object.
  • Set the spawn rotation (fixed or randomised) for any object.
  • Determine if an object needs to be flipped for opposite sides of the road when spawned.
  • All object sizes are calculated automatically using their renderer bounding box but you can manually add a collider to the object to determine its size if you need to determine exactly how the system should determine that objects size.

… best of all, this system can be used to generate anything. For us it suited City Generation but this system takes unlimited objects and spawns them in a grid with custom spacing so if you think your game could easily benefit from automatically creating a layout in seconds, you need to get City Generator for Unity3D!


PLEASE NOTE: The models in the screenshots and video ARE NOT included in the City Generator package. They are only examples to show how the system can use anything your throw at it quickly and easily. For reference if anyone wants them they are from an awesome creator called K4!

Few screenshots to wet the appetite :slight_smile:









1 Like

Thanks about the mobile performance tips.

So as long as my buildings are lo-poly and small textures, small cities should theoretically be able to be generated at runtime (if you do implement this feature in the future) on a relatively recent mobile device within a short loading period (I would say the player would start getting annoyed if generation took over 10 seconds).

That’s what I meant by performance benchmarks – “can generate a small city of 100 lo-poly buildings in 10 seconds on an iPhone 5,” something like that. I’ve used Daedalus dungeon generator in the past (a fairly comparable asset I think) and it is able to generate a fairly large lo-poly dungeon at runtime on a Galaxy Note 2 and iPhone 5/s in just a few seconds.

Thanks for any insight! A demo apk would be the best, but performance benchmarks would work too. I understand you have not implemented runtime features at this time, so I can wait for this in case you do!

Also, can you determine the facing direction of individual buildings by using rules during generation? Such as “have all main doors of buildings always face the closest street, with east-west facing preferred over north-south,” etc.

Also, can it generate streets and traffic signals in the blank spaces to use with your traffic asset.

Thank you!

Could come in handy

No problem we will try and run this test for you and let you know the results.

Yes this is a feature already. You can determine the rotation to spawn for each individual object and also enable the flipping of the object to face the street always. It is all in the video - this particular item is explained at the start during the explanation of the CityGeneratorAsset.cs. You can also find an example of this in the video at around 4:30 minutes.

As for street and traffic signals, this system was built to work together with the Road & Traffic System making both simple to implement quickly now. City Generator creates the road spacing for the Road & Traffic System to come through and place the road and spawn the traffic.

Ok we now have it running in realtime so you can generate layouts on the fly or in the editor and keep the prefabs connected. Check out the webplayer and the Android (mobile) demo here: http://wireddevelopments.com/citygenerator/demo.php

Hi eridani, test for mobile is ready and it is very fast! You can grab it here: http://wireddevelopments.com/citygenerator/demo.php

Whoa you guys work fast! And the city generation works fast too =) I’m very impressed!

You know what would make my life complete now?? I don’t know how much work this would take you guys. But if you could have pedestrians (simple mecanim or legacy characters that we substitute) walking on sidewalks of the Traffic System, and stopping at red lights before crossing the street, and walking around each other when they get in each others’ way, and maybe even entering and exiting buildings… that would be the holy grail of city generators!

In fact, you could package the City Generator with Traffic System and a Pedestrian System as a procedural GTA (Grand Theft Auto) type sandbox game generator…I think tons of people are looking for such an asset.

Anyway, I am definitely interested in both your City Generator and Traffic System right now. Will you offer any kind of bundle deal when getting both together? Thank you for your hard work.

Thanks Eridani, we are working hard to get a solid product in this space that is for sure. We will look into the Pedestrian System as it shouldn’t be a massive job to add that to the Traffic System or even create a standalone system. As for a bundle deal, we might look at submitting a bundle product but currently it isn’t in the pipeline.

Just added support for Unity Terrain! Can check it out in the updated demo on the website: http://wireddevelopments.com/citygenerator/demo.php

1 Like

This is looking like it could be very helpful!

I’m interested in a pedestrian system as well. Other AI could be adapted to this purpose, of course, but it would be best to have something keyed directly to these assets that could allow pedestrians to take proper advantage of the roadways (jaywalking when there is no traffic) and street lights (crossing on WALK).

And, preferably, something that can be used along with EasyRoads 3.0, though I have to say that if the City Generator can lay down roads and sidewalks, EasyRoads becomes less needed.

We are looking into a pedestrian system and it will take full advantage of the City Generator plugin and Road & Traffic System plugin when complete.

Our Road & Traffic System which works hand in hand with City Generator can generate all the roads you need. As for sidewalks, since you can easily create custom models and textures to replace or add to the default list of road pieces you can put in sidewalks yourself. We will look to add sidewalk pieces and textures in as an option soon since we have had a few requests for it. Definitely check out our Road & Traffic System though: http://wireddevelopments.com/trafficsystem

City Generator and Road & Traffic System now working together with the click of the “Generate City” button!


City Generator just released! Purchase on the Asset Store here.

Road around the city it’s must wanted :slight_smile:
it’s always good to see new

does this take advantage of static batching? ie. is it possible to combine a cluster of buildings into 1 gameobject to improve perfomance?

  1. Is it possible to see a demo of the Traffic System + City Generator working together? Is it a one-click process with random streets, or do streets have to be laid out manually first.

  2. Can the buildings fill in every blank space of the Traffic System streets… in other words a very dense city? (in your example picture, some spaces are filled with trees, and some spaces are completely blank).

  3. Will you actually be working on a sidewalk and pedestrian system or is that still pending a decision?

Thank you!

Yes you can static batch your objects and yes, there shouldn’t be any reason why you couldn’t cluster buildings into one gameobject. You can create any kind of prefab you like to be spawned from one small object to putting a group of objects together, placing them under one gameobject, setting its collider to be the outer size of the combined group of objects (so the system knows how big the gameobject should be) and saving that as a prefab to be used in the system.

The City Generator is very versatile. It was called “City Generator” because that was originally why we made it, to generate Cities around our road networks that Road & Traffic System creates but really City Generator is a way of place objects in a set are in very dynamic ways (rows, columns, random grids, different terrain highs, dynamic spacing, dynamic random objects…and lots more. See more on the website and the unity asset store page for details)