Files
DTrierFlood_Linux/AGENTS.md

2.8 KiB

Repository Guidelines

Project Structure & Module Organization

This is a Unity project. Core content lives under Assets/, with runtime scripts in Assets/Scripts/, editor tooling in Assets/Scripts/Editor/, scenes in Assets/Scenes/, and prefabs/settings in Assets/TilePrefabs/ and Assets/Settings/. Input data for the geo tile pipeline is expected in Assets/GeoData/. Unity configuration is in ProjectSettings/ (editor version in ProjectSettings/ProjectVersion.txt), and package dependencies are in Packages/manifest.json. The *.sln/*.csproj files are generated by Unity; avoid manual edits.

Build, Test, and Development Commands

There are no CI configs or repository-specific build scripts. Use Unity Editor 6000.3.3f1 (per ProjectSettings/ProjectVersion.txt) and:

  • Open the project via Unity Hub and press Play in Assets/Scenes/SampleScene.unity (or Assets/Scenes/TestArea.unity for geo tiles).
  • Build from Unity: File > Build Settings > Build or Build & Run.
  • Optional CLI automation (if Unity is on PATH):
    • Build: "<UnityEditorPath>" -projectPath . -batchmode -quit -buildTarget StandaloneLinux64
    • Tests: "<UnityEditorPath>" -projectPath . -batchmode -quit -runTests -testPlatform EditMode For terrain import, use Unity menu: Tools > Geo Tiles > Import Terrain Tiles (PNG16).

Coding Style & Naming Conventions

Use standard C# style with 4-space indentation and Allman braces. Classes and methods use PascalCase, fields and locals use camelCase, and filenames match the main class (e.g., GeoTileImporter.cs). Keep editor-only code under Assets/Scripts/Editor/ so it compiles into the editor assembly.

Testing Guidelines

No custom test folders exist yet. If adding tests, use Unity Test Runner and place them under Assets/Tests/EditMode/ or Assets/Tests/PlayMode/, naming files *Tests.cs. Document how to run any new test suites in this file.

GeoData Generation Pipeline

The GeoData generation pipeline lives in ~/Dev/InformatikProjekt/GeoData. Generate data there, then copy (or sync) outputs into this repo at Assets/GeoData/. Expected inputs include tile_index.csv, height_png16/, ortho_jpg/, buildings_tiles/, trees_tiles/, street_furniture/, buildings_enhanced/, trees_enhanced/, and tree_proxies.glb. Keep the folder names consistent with the importer defaults.

Commit & Pull Request Guidelines

Current history uses short, lowercase, sentence-style messages (e.g., init, updated the build pipeline) without prefixes; follow the same convention. For pull requests, include a brief description, testing notes (Play mode or build target), and screenshots or GIFs for scene or UI changes.

Configuration & Generated Files

Treat Library/, Temp/, and Logs/ as generated output; avoid manual edits. When adding assets, keep .meta files in sync and prefer importing through the Unity Editor.