Releases: santiandrade/Unity-CityGenerator
Releases · santiandrade/Unity-CityGenerator
Release list
v3.4.0
Added
- Runtime minimap markers can now be registered through
MinimapHUDor
CityGeneratorCity.Minimap, using a caller-provided UI prefab and either a movingTransformor
a fixed world position. Each marker can hide outside the visible radius or remain clamped just
inside the circular edge, and is removed safely through an owner-boundMinimapMarkerHandle.
v3.3.1
Fixed
- Quitting a city generated with
Enable Physicson no longer stalls for ten seconds or
more, on leaving Play mode and on closing a build alike. Suppressing the vehicle/pedestrian
contact registers one ignored pair per (physics vehicle, pedestrian) combination, and Unity
keeps every ignored pair in a single global table that it rescans in full whenever any
collider is destroyed — so a scene teardown paid that scan once per collider in the whole
scene, not just per vehicle or pedestrian. The table is now emptied in one pass before
teardown starts. Behaviour is otherwise unchanged: pedestrians still never push a vehicle
around, and the player still collides with vehicles exactly as before.
v3.3.0
Added
- New
Enable Physicstoggle in a new Physics card, below Traffic (off by default), marked
BETA. When on, every generated vehicle gets a dynamicRigidbodyand a configurable physic
material (Mass/Drag/Angular Drag/Physic Material), so it responds realistically to
impacts from other vehicles, from any external Rigidbody in the scene, or from static geometry,
and recovers back onto its route afterwards once it settles. With the toggle off, generation and
runtime behaviour are unchanged from before this feature. Turning it on shows an info box
warning that it's still beta, may cause unexpected vehicle behaviour, and recommending against
a high vehicle count relative to the generated city's size. Pedestrians never push a vehicle
around under this mode: a generated pedestrian has noRigidbody(infinite mass, as far as the
physics engine is concerned), so its contact with a vehicle is suppressed outright and never
counts as an impact. The player keeps colliding with vehicles exactly as before.
v3.2.0
Added
MinimapHUDcan now be pointed at anyTransformvia its newmarkerTarget/MarkerTarget
field, so the minimap arrow can follow something other than the player. Leftnull(the
default), it keeps finding the scene'sPlayerControllerexactly as before.
v3.1.1
Fixed
- Editing any setting that shapes the pedestrian graph (Grid Width/Height among them) no longer
scatters traffic lights across the open scene. The Custom Pedestrians node picker builds a
throwaway preview of the graph, which instantiates the real Traffic Light Prefab to place its
crossing nodes; its root was hidden withHideFlags.HideAndDontSave, which hides an object from
the Hierarchy but still renders it and still registers its colliders. The preview root is now
inactive and carries its ownCityGeneratorRoot, so nothing reaches the scene and
PedestrianNetworkstill scopes its traffic-light matching to the preview itself. - The same preview no longer cross-matches against a real generated city's intersections when one
is open in the scene, which addedCurb/Crossingnodes to the picker at corners the generated
city would leave unsignalled. - A preview root stranded by a domain reload (its owning window's reference is lost, but a
DontSaveobject survives) is now destroyed on the next preview build instead of staying in the
scene forever, invisible in the Hierarchy.
v3.1.0
Added
- Multiple cities can now coexist in the same scene (SPEC 16).
TrafficNetworkand
PedestrianNetworkbuild their graph nodes relative to their own root's transform
(transform.TransformPoint/TransformDirection) instead of in absolute world space, so a
CityGeneratorRootcopied to a new position (only translation is supported — see the user
manual) keeps a correct graph. Traffic light/intersection matching is scoped to each network's
ownCityGeneratorRoothierarchy (falling back to a scene-wide search when there is none), so
two cities in the same scene never cross-match each other's signals. - New
Tools > City Generator > Rebuild Minimapmenu: recaptures the minimap snapshot for the
city/cities currently in the scene at their current position, without regenerating anything —
fixes a minimap left out of sync after moving aCityGeneratorRootby hand. With two or more
cities, captures one snapshot covering the union of their footprints (with an editable
resolution) and points every one of theirMinimapDataat it, merging their Points of Interest. MinimapData.localCenter/localSize: each city's own footprint in its root's local space,
invariant to moving the root — the stable sourceRebuild Minimapreads instead of
recalculating the footprint from scratch or trustingRenderer.bounds.MinimapHUDnow picks whichever city's captured footprint contains the player (falling back to
the closest by centre distance) instead of always resolving the firstMinimapDatafound —
needed once more than one city can have the Minimap enabled at once.Rebuild City in Current Scenenow handles two or moreCityGeneratorRoots in the active scene:
with one confirmation dialog naming them, it destroys all of them and leaves only the newly
generated city (unchanged behaviour with zero or one).Assets/Tests/EditMode/Generation/MultiCityNetworkTests.cs— synthetic multi-root coverage for
the coordinate-relativity and hierarchy-scoping rules above.
v3.0.0
Changed (BREAKING)
CityGeneratorAPIreworked from a static, single-city cache into a per-city resolver. v2.10's
CityGeneratorAPI.IsCityAvailable/.City/.Player/.Traffic/.Pedestrians/.Minimap/.Audio
static surface is removed. In its place:CityGeneratorAPI.Default/.All/.InScene(scene)/
.For(info)resolve an explicit, immutableCityGeneratorCityhandle against a registry that
CityGeneratorInfomaintains viaOnEnable/OnDisable(no cached/global lookup remains anywhere
in the class), and the handle exposes the exact same six modules and the exact same data/mutation
surface as v2.10, as properties for reads and methods for writes (city.City.SetHour(12f)). The
old static cache never invalidated once resolved, so with more than one city in memory (a
regenerated city, two scenes loaded additively) it could silently answer for the wrong one. See
docs/api-reference.mdfor the full migration table.
Added
Assets/Tests/PlayMode/CityGeneratorAPITests.cs,MinimapHUDTests.csand
FreeCameraControllerTests.cs— behavioral coverage for the reworked API's registration/
resolution lifecycle and characterization coverage for the Minimap HUD and Free Camera, closing
the P1 gapdocs/technical-review-2026-09-03.mdflagged for all three.
v2.10.1
Fixed
- Traffic light validation now matches what the builder actually places. The validator asked for
a Traffic Light prefab only on a grid larger than 1x1 (or a custom shape containing a full 2x2 of
cells), whileCityGeneratorTrafficBuilderhas signalled every intersection with at least 3 real
arms since SPEC 11 — so a 1xN/Nx1 grid, or a custom shape with a T-intersection, passed validation
with the prefab left empty and then failed generation with aNullReferenceExceptionfrom
instantiating a null prefab. Both sides now share one predicate
(CityGeneratorTrafficBuilder.HasSignalledIntersection), pinned to the builder by
SignalledIntersectionAgreementTests. The requirement is independent ofInclude Traffic, since
the lights are generated even with traffic off. - The Pedestrians tab's "isolated blocks" warning used that same stale rule and so wrongly claimed a
1xN/Nx1 city had no crossings (a 1x2 city actually gets 6 lights, 6 crossings and a single
connected pedestrian component); it also ignored Custom Grid entirely. It now asks the shared
predicate and covers both grid modes. - "Set Current Selection As Default" silently dropped the Custom Pedestrians list. The generated
defaults file rebuilt every other card but omittedsettings.customPedestriansentirely, so saving
a selection as default and then resetting the window lost every custom pedestrian entry. The writer
now emits the list, including each entry's node selection and its graph fingerprint — without the
fingerprint a restored entry would look stale against a graph that hasn't actually changed.
Changed
- The bundled default settings now ship with two Custom Pedestrians entries (a Dog and a Cat from
DefaultAssets/Prefabs/Pets/), each confined to its own hand-traced area, so a fresh install
demonstrates the Custom Pedestrians card out of the box.
v2.10.0
Added
- New Runtime API (
CityGeneratorAPI,Packages/.../Runtime/API/): a static, module-per-tab
(City,Player,Traffic,Pedestrians,Minimap,Audio) read entry point for a generated
city's data, working the same in Editor Play Mode and in a player build.IsCityAvailableand
every getter degrade to a safe default (0/false/Vector2Int.zero/Vector3.zero/null) instead of
throwing when no city is active. A small number of setters already safe at runtime are exposed:
City.SetDayNightEnabled/SetHour,Minimap.SetVisible/SetViewRadiusMeters. Backed by a new
CityGeneratorInforuntime component thatCityGeneratorSceneBuilder/CityGeneratorContentAssembler
populate on every Build/Re-Build. Seedocs/api-reference.md.CityGeneratorInfo's Inspector is
now read-only (Editor/CityGeneratorInfoEditor.cs) since it's a build-time snapshot, not a live
control — hand-editing its fields never had any effect on the generated city.
v2.9.0
Added
- New "Free Camera" card (Player tab): a "Free View" mode toggled with the V key, replacing the
Player and its third-person camera with a free-flying first-person camera (WASD + Q/E vertical,
Shift to sprint, mouse-look with smoothed rotation, basic collision against scene colliders).
Toggling again restores the Player exactly where it was and the third-person camera resumes
orbiting it. Backed by a new "Free View" Input Actions map and aToggleaction added to the
existingPlayermap, both editable like the rest of the project's input actions. Ignored (no
Free Camera added, no error) when Player is disabled.