Skip to content

Releases: santiandrade/Unity-CityGenerator

v3.4.0

Choose a tag to compare

@santiandrade santiandrade released this 15 Sep 14:43

Added

  • Runtime minimap markers can now be registered through MinimapHUD or
    CityGeneratorCity.Minimap, using a caller-provided UI prefab and either a moving Transform or
    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-bound MinimapMarkerHandle.

v3.3.1

Choose a tag to compare

@santiandrade santiandrade released this 10 Sep 15:19

Fixed

  • Quitting a city generated with Enable Physics on 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

Choose a tag to compare

@santiandrade santiandrade released this 10 Sep 00:11

Added

  • New Enable Physics toggle in a new Physics card, below Traffic (off by default), marked
    BETA. When on, every generated vehicle gets a dynamic Rigidbody and 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 no Rigidbody (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

Choose a tag to compare

@santiandrade santiandrade released this 08 Sep 22:53

Added

  • MinimapHUD can now be pointed at any Transform via its new markerTarget/MarkerTarget
    field, so the minimap arrow can follow something other than the player. Left null (the
    default), it keeps finding the scene's PlayerController exactly as before.

v3.1.1

Choose a tag to compare

@santiandrade santiandrade released this 08 Sep 00:26

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 with HideFlags.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 own CityGeneratorRoot, so nothing reaches the scene and
    PedestrianNetwork still 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 added Curb/Crossing nodes 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
    DontSave object survives) is now destroyed on the next preview build instead of staying in the
    scene forever, invisible in the Hierarchy.

v3.1.0

Choose a tag to compare

@santiandrade santiandrade released this 04 Sep 22:25

Added

  • Multiple cities can now coexist in the same scene (SPEC 16). TrafficNetwork and
    PedestrianNetwork build their graph nodes relative to their own root's transform
    (transform.TransformPoint/TransformDirection) instead of in absolute world space, so a
    CityGeneratorRoot copied 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
    own CityGeneratorRoot hierarchy (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 Minimap menu: 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 a CityGeneratorRoot by hand. With two or more
    cities, captures one snapshot covering the union of their footprints (with an editable
    resolution) and points every one of their MinimapData at 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 source Rebuild Minimap reads instead of
    recalculating the footprint from scratch or trusting Renderer.bounds.
  • MinimapHUD now picks whichever city's captured footprint contains the player (falling back to
    the closest by centre distance) instead of always resolving the first MinimapData found —
    needed once more than one city can have the Minimap enabled at once.
  • Rebuild City in Current Scene now handles two or more CityGeneratorRoots 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

Choose a tag to compare

@santiandrade santiandrade released this 04 Sep 13:56

Changed (BREAKING)

  • CityGeneratorAPI reworked 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, immutable CityGeneratorCity handle against a registry that
    CityGeneratorInfo maintains via OnEnable/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.md for the full migration table.

Added

  • Assets/Tests/PlayMode/CityGeneratorAPITests.cs, MinimapHUDTests.cs and
    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 gap docs/technical-review-2026-09-03.md flagged for all three.

v2.10.1

Choose a tag to compare

@santiandrade santiandrade released this 03 Sep 22:44

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), while CityGeneratorTrafficBuilder has 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 a NullReferenceException from
    instantiating a null prefab. Both sides now share one predicate
    (CityGeneratorTrafficBuilder.HasSignalledIntersection), pinned to the builder by
    SignalledIntersectionAgreementTests. The requirement is independent of Include 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 omitted settings.customPedestrians entirely, 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

Choose a tag to compare

@santiandrade santiandrade released this 02 Sep 23:04

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. IsCityAvailable and
    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
    CityGeneratorInfo runtime component that CityGeneratorSceneBuilder/CityGeneratorContentAssembler
    populate on every Build/Re-Build. See docs/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

Choose a tag to compare

@santiandrade santiandrade released this 02 Sep 14:49

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 a Toggle action added to the
    existing Player map, both editable like the rest of the project's input actions. Ignored (no
    Free Camera added, no error) when Player is disabled.