GridBuilding Plugin Workspace
This VS Code workspace provides a focused development environment for the GridBuilding plugin with access to all necessary tools and documentation.
Workspace Structure
The workspace includes the following folders:
- GridBuilding Plugin - Main plugin source code
- Toolkits - Analysis and development tools (
../../../toolkits) - Scripts - Build and validation scripts (
../../../../scripts) - GridBuilding Docs - Hugo documentation site (
../../../../docs/gridplacement) - Legacy GDScript Plugin (grid_building) - Original GDScript toolkit and tests (
../../tools/grid_building)
Quick Start
Workflow entrypoints (recommended)
| |
Opening the Workspace
- Open VS Code
- File → Open Workspace
- Navigate to and select
GridBuilding.code-workspace
Essential Commands
Building
Ctrl+Shift+B- Build main solutionF1 → Tasks: Run Task → build-isolation- Build isolation tests only
Testing
F1 → Tasks: Run Task → test-all- Run all testsF1 → Tasks: Run Task → test-isolation- Run isolation tests only
Code Analysis
F1 → Tasks: Run Task → run-toolkit-analysis- Run static analysisF1 → Tasks: Run Task → validate-structure- Validate project structure
Documentation
F1 → Tasks: Run Task → build-docs- Build GridBuilding documentation
Debugging Configurations
Launch Configurations
- Launch Godot (GridBuilding) - Launch Godot with the GridBuilding plugin
- Debug GridBuilding Tests - Debug main test suite
- Debug Isolation Tests - Debug PlaceablePOCSLoading isolation tests
Test Development Workflow
- Make changes to isolation tests in
Tests/Working/PlaceablePOCSLoading/ - Run
test-isolationtask for quick feedback - Run
test-alltask to verify integration - Use debug configurations for step-through debugging
Key Features
Integrated Tooling
- Static Analysis: Code smell detection and quality checks
- Structure Validation: Automated project structure verification
- Documentation: Direct access to Hugo docs building
- Test Isolation: Focused test development environment
Recommended Extensions
- C# Dev Kit - Enhanced C# development experience
- Godot Tools - Godot engine integration
- Rust Analyzer - For toolkit development
- YAML - For configuration file editing
Settings Highlights
- Excludes build artifacts and temporary files
- Configures dotnet solution to
GridBuilding.sln - Enables C# inlay hints and semantic highlighting
- Sets up Godot editor integration
File Organization
Working Tests
Tests/Working/PlaceablePOCSLoading/
├── PlaceablePOCSLoadingIsolationTest.cs
├── PlaceablePOCSLoading.IsolationTests.csproj
└── README.md
Main Tests
Tests/GodotTests/GoDotTest/
├── PlaceablePOCSLoadingTest.cs
└── GridBuilding.Core.GodotTests.csproj
Development Workflow
Pattern 1: Internal Dependencies (GDScript)
- Rule (runtime): Preload directly in the classes that need them. Do not use an internals registry.
- Obsolete:
GBInternalsis obsolete (renamed toGBInternals_OBSOLETE). Do not reference it. - Prefer direct
class_nameusage when a type is intended to be referenced broadly. - For true internals (scripts that intentionally have no
class_name): use a localpreload("res://...")constant. - Rationale: prevents an internals registry from becoming accidental public API and avoids fragile global preload paths.
Canonical Editing Rule (Plugins vs Demo)
- Canonical source of truth: this plugin repo under
plugins/gameplay/GridPlacement/**(and related plugin repos). - Demo projects (e.g.
demos/grid_building_dev/godot/**) are validation consumers and are kept in sync via scripts. - Sync entrypoints (one-way, plugin -> demo):
- Config:
demos/grid_building_dev/scripts/sync/addon_sync.yaml - Run:
bash demos/grid_building_dev/scripts/sync/watch_addon_sync.sh
- Config:
- Create/modify plugin tests in the plugin repo by default.
- Exception: demo-only runtime code or demo-only tests/scenarios that are not intended to ship with the plugin.
1. Feature Development
- Work in isolation tests first (
Tests/Working/) - Get quick feedback with focused test runs
- Use toolkits for code analysis
2. Integration Testing
- Move stable tests to main test suite
- Run full test suite to verify integration
- Validate project structure
3. Documentation
- Update documentation in
docs/gridplacement/ - Build docs to verify changes
- Commit both code and docs together
Environment Variables (Optional)
You can set these for enhanced functionality:
GODOT_BIN- Path to Godot executableTOOLKIT_BIN- Path to toolkit binariesHUGO_BIN- Path to Hugo executable
Troubleshooting
Common Issues
- Build Failures: Run
validate-structuretask first - Test Issues: Check toolkit analysis output for code smells
- Documentation: Ensure Hugo dependencies are installed
Getting Help
- Check the main project README:
../../../../README.md - Review toolkit documentation:
../../../toolkits/cs/README.md - Consult scripts documentation:
../../../../scripts/README.md
Benefits
This workspace provides:
- Focused Development: Only GridBuilding-related files visible
- Quick Access: Toolkits and scripts readily available
- Integrated Testing: Both isolation and full test suites
- Documentation Integration: Direct Hugo docs access
- Performance: Faster builds with targeted compilation
Use this workspace for all GridBuilding plugin development to get the most efficient and focused development experience.