Native imported-model audit and palm root correction
Rampage.Editor.EditorModelImportAudit.Run() reads actual Unity-imported Resources prefabs without instantiating them or changing importers, scenes, assets or runtime code. It records root TRS and importer settings, each mesh's bounds, UV/normal counts, mesh readability, asset hashes and bounds under retained/cancelled root transformations. Matrices are serialized in row-major order. Bounds are transformed mesh AABBs, not a rendered acceptance test.
The native run at 2026-09-15 17:35:00.8806376 UTC, Unity 6000.3.24f1, loaded all 29 requested prefabs. All meshes were readable and had UV0 attributes. Its unchanged evidence is archived at QA/imported-model-metrics-before-palm-root-fix.json, SHA256 5c5a31ae03645f1d725ca9fad38f6b3fca59cc484c0d0ab07575223f32474462.
Fir, ValleyTree, Cypress, TropicalTree and the three regional architecture families have identity imported roots in this run. Fir LOD0 measures 18.977 m and ValleyTree LOD0 4.633 m, consistent with their 18.95705 m and 4.65 m runtime reference heights. Their existing root cancellation does not change the measured dimensions, so this work applies no root correction to those models.
The nine palm prefabs—CoastalPalm, CoastalPalmBent and DatePalm at three LODs each—retain the FBX unit/axis conversion on the imported root: uniform scale 100 and approximately +90 degrees X. The previous prefab.worldToLocalMatrix * filter.localToWorldMatrix removed that required conversion.
| Family, LOD0 | Old cancelled-root vertical size | Imported root retained | Source height |
|---|---|---|---|
| CoastalPalm | 0.05863 m | 12.00000 m | 12.00000 m |
| CoastalPalmBent | 0.06966 m | 12.00000 m | 12.00000 m |
| DatePalm | 0.12901 m | 12.60900 m | 12.60900 m |
The old values are the width of tiny sideways models, not merely a smaller upright tree. Retaining the actual imported matrix restores both orientation and metre scale. All nine preserved matrices have positive orthogonal TRS without shear; their aggregate heights match the corresponding original source bounds within 0.002 m. This numerical check is recorded in QA/palm-import-transform-evidence.json.
Bounded runtime correction
RegionalVegetation.Load now selects filter.transform.localToWorldMatrix only for those three explicitly identified palm families. Other families keep the previous calculation. The selected matrix is cached with the existing shared mesh part; the existing per-instance TRS, renderer, materials and LODGroup code is unchanged. There is no hard-coded new 100× scale or guessed rotation.
The production sources already normalize the two coastal models to 12 m. DatePalm is an authored thicker-stem, denser-crown derivative with 12.609 m at LOD0/1 and 12.159 m at LOD2; that source LOD difference remains unchanged. RegionalVegetation.Place uses only the caller's uniform scale, with no additional height divisor. Primary coastal/Nile placement scales remain 0.68–1.02, giving approximately 8.16–12.24 m coastal palms and 8.57–12.86 m near date palms. Secondary Nile rows keep their existing 0.67–0.94 scale. The existing 0.06 m grounding inset also remains unchanged.
Only RegionalVegetation.cs changes runtime behavior in this correction. No model, texture, importer setting, placement call, collider, route, physics, cache ownership or per-frame work is added. The integrated source compiles with 91 Runtime + 21 Editor files, zero warnings/errors. No Unity or player was started by the implementing agent.
Remaining native acceptance
The recorded native audit predates the runtime palm fix; its cancelled-root matrices are retained as the failure evidence. A Windows build containing the correction still needs regional game-camera review for actual palm orientation/height, road clearance, LOD transitions and resource plateau. The diagnosis proves the import fault and supports the selected transform; it does not claim that those subsequent visual/runtime checks have passed.