You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const std::string editorOnlyComment = "// Doriax API headers for this project are provided by .doriax/engine-api; see generated CMakeLists.txt for local and upstream source references.\n";
310
+
const std::string exportComment = "// This file binds scene script metadata to compiled C++ and Lua scripts for the current build configuration.\n";
agentsContent += "<!-- This file is auto-generated by Doriax Editor. -->\n\n";
895
+
agentsContent += "# Doriax Project Context\n\n";
896
+
agentsContent += "This project was generated by Doriax Editor.\n\n";
897
+
agentsContent += "## Source references\n\n";
898
+
agentsContent += "- Runtime API headers used by this project (snapshot): `" + engineApiRelativePath.generic_string() + "`\n";
899
+
agentsContent += "- Local engine API source used by this editor build: `" + (exePath / "engine").generic_string() + "`\n";
900
+
agentsContent += "- Full engine **and editor** source (upstream): https://github.com/doriaxengine/doriax\n\n";
901
+
agentsContent += "The two local paths above contain only the runtime engine API (what user code links against).\n";
902
+
agentsContent += "They do **not** include the editor itself. To understand the YAML schema of `*.scene`, `*.bundle`, and `project.yaml`, or how the generator/factory produces C++, consult the upstream repository — specifically the `editor/` directory.\n\n";
903
+
agentsContent += "## Generated files\n\n";
904
+
agentsContent += "These files are produced by the editor when a scene is played/run and are intended for **in-editor testing only**. Project export/distribution uses a separate pipeline and does not reuse these files. Do not edit them manually — they will be overwritten on the next generation:\n\n";
agentsContent += "- `" + engineApiRelativePath.generic_string() + "/` (engine API snapshot copied from the editor)\n\n";
909
+
agentsContent += "## Regenerating C++ code\n\n";
910
+
agentsContent += "The generated C++ sources (scene factories, script bindings) are derived from `*.scene`, `*.bundle`, and `project.yaml` files.\n";
911
+
agentsContent += "If you modify any `*.scene`, `*.bundle`, or `project.yaml` file, **you must return to Doriax Editor and play/run the scene** so the editor regenerates all C++ code under `" + relativeInternalPath.generic_string() + "/generated`.\n\n";
912
+
agentsContent += "## C++ Scripts\n\n";
913
+
agentsContent += "User C++ script files (`.h`/`.cpp`) can be placed anywhere in the project outside of `" + relativeInternalPath.generic_string() + "/`.\n";
914
+
agentsContent += "Each script class must inherit from `doriax::Script`. "
915
+
"The editor discovers and registers scripts automatically; "
916
+
"they are added to `SCRIPT_SOURCES` in the generated `CMakeLists.txt` and compiled into the project.\n";
917
+
agentsContent += "Lua scripts (`.lua`) are separate — they are loaded at runtime and are not compiled into the binary.\n\n";
918
+
agentsContent += "## Build modes\n\n";
919
+
agentsContent += "- **Editor mode** (`DORIAX_EDITOR_PLUGIN=ON`): builds as a shared library; `main.cpp` and Factory-generated scene sources are excluded. Used by the editor to hot-reload the project.\n";
920
+
agentsContent += "- **Standalone mode** (`DORIAX_EDITOR_PLUGIN=OFF`, default): builds as an executable; includes `main.cpp` and all Factory sources. This standalone build is for local testing only — production distribution uses the editor's separate export pipeline.\n";
0 commit comments