v5.0 to v6.0 Migration Guide
Migrating to GridPlacement 6.0 (C#)
This guide helps you upgrade your project from the GridBuilding v5.0 (GDScript-based) plugin to the C#‑based GridPlacement 6.0 plugin. Under the hood, the C# assemblies and namespaces still live under GridBuilding.* (for example GridBuilding.Core), but the Godot-facing plugin and docs are branded GridPlacement 6.0. The new architecture provides significant performance and reliability improvements.
🎯 What’s Changing?
GridBuilding v6.0 introduces a Service-Based Architecture written in pure C#. This change affects how you interact with the plugin’s core systems, but the Godot-facing API (nodes, resources, signals) remains familiar.
| Component | v5.0 (GDScript) | v6.0 (C#) | Benefit |
|---|---|---|---|
| State Objects | Godot Resources | Pure C# Classes | Significantly faster test execution [internal testing] |
| Core Systems | Godot Nodes | Service Classes | Compile-time type safety |
| Data Objects | Godot Resources | C# Classes | Better encapsulation |
| UI Components | Godot Nodes | Godot Nodes | No change |
🧭 Should I Migrate Now?
Short answer: Once GridPlacement 6.0 is marked production‑ready, you should plan to migrate as soon as practical. The C# architecture is vastly more maintainable and will be the canonical version going forward; the 5.x GDScript plugin will enter maintenance mode and be phased out over time.
We strongly recommend migrating to GridPlacement 6.0 when ALL of the following are true:
- ✅ 6.0 has been tagged as a stable release in the plugin docs/repository.
- ✅ Your target Godot version supports C# (Godot 4.x with .NET).
- ✅ You are willing to maintain a small C# project alongside your GDScript game code.
- ✅ You are not blocked by a missing integration guide or tool noted in the docs (for example, items still marked “draft” or “planned”).
You may choose to temporarily stay on GridBuilding 5.x (GDScript) if:
- You are shipping a product imminently on an existing 5.x codebase and cannot risk architectural changes right now.
- Team members are not yet comfortable maintaining any C# code.
- You rely on tutorials or tools that haven’t been updated for 6.0 yet.
However, the long‑term plan is:
- 🧱 GridPlacement 6.0 (C#) becomes the canonical plugin.
- 🧊 GridBuilding 5.x (GDScript) is frozen except for critical bug/security fixes.
- 📦 New features, performance work, and deep refactors will target C# first.
🧰 What You Need in Your Project
To use GridPlacement 6.0, your Godot project must be C#‑enabled and able to reference the core DLL:
Set up a C# Godot project
- Follow the official Godot docs for creating a C# project (Godot 4 + .NET):
- Ensure a
.csprojexists for your game, and that Godot recognizes C# scripts.
Add the core library (GridBuilding.Core.dll)
- Place
GridBuilding.Core.dllinto a managed library folder inside your project (for exampleres://lib/orres://libs/, depending on your project convention). - Reference that DLL from your C# project so your game code and adapters can use
GridBuilding.Coretypes.
- Place
Install the Godot‑side plugin
- Copy the GridPlacement 6.0 Godot plugin into:
res://addons/GridPlacement/(PascalCase folder name).
- Enable the plugin in Project → Project Settings → Plugins.
- The plugin’s C# adapter nodes will then be available for scenes and UI.
- Copy the GridPlacement 6.0 Godot plugin into:
🔄 Key Architectural Changes
State Management
State objects are no longer Godot Resources. They are now pure C# classes, which means:
- Faster Access: No Godot overhead for state operations
- Better Testing: States can be tested without Godot
- Type Safety: Compile-time error checking
Service Layer
Business logic is now handled by dedicated Service classes:
- BuildingService: Manages build operations
- ManipulationService: Handles object transformations
- InputService: Processes user input
Communication Pattern
The new architecture uses a strict unidirectional flow:
- Godot Layer calls Service methods
- Service updates State
- Service fires Events
- Godot Layer listens to Events and updates visuals
📋 Migration Checklist
Before You Start
- Backup your project
- Note any custom modifications to GridBuilding scripts
- Disable GridBuilding plugin temporarily
Migration Steps
1. Update Plugin
- Remove the old GridBuilding plugin folder
- Install the new GridBuilding v6.0 plugin
- Re-enable the plugin in Godot settings
2. Update Your Code
Most of your code will work without changes, but check these areas:
State Access (If Directly Accessed)
| |
Custom Signals
| |
3. Verify Functionality
- Test basic building placement
- Test manipulation (move/rotate/delete)
- Check custom UI integration
- Verify save/load functionality
🚀 Performance Benefits You’ll See
- Faster Build Mode: Entering build mode is significantly faster [internal testing]
- Smoother UI: State updates no longer block the main thread
- Better Error Messages: Compile-time errors catch issues early
- Improved Stability: Strong typing prevents many runtime errors
🛠️ Common Migration Issues
Issue: “Can’t find state property”
Cause: Direct state access is no longer supported. Solution: Use the service API methods instead.
Issue: Custom scripts don’t compile
Cause: API changes in core systems. Solution: Check the API Reference for updated method signatures.
Issue: Performance seems slower
Cause: First-time C# compilation overhead. Solution: This is normal. Performance improves after the initial run.
📞 Getting Help
If you encounter issues during migration:
- Check the API Reference for updated methods
- Review the Service Architecture guide
- Ask in the community for help from other developers
🔧 5.0 → 6.0 Migration Tool (Planned)
To make upgrades easier, a dedicated 5.0 → 6.0 migration tool is planned. The goal of this tool is to:
- Scan your project for GridBuilding 5.x GDScript dependencies (scripts, resources, scenes).
- Help convert or re‑wire those usages to the new C# GridPlacement 6.0 APIs and resources where possible.
- Produce a report of anything it cannot safely convert automatically, so you can review those spots manually.
The exact capabilities and UX of this tool are still in design; this guide will be updated with concrete usage instructions once the tool is ready.
🎉 You’re Done!
After migration, you’ll have a more robust, faster, and maintainable GridBuilding system. The new C# foundation enables future features and better performance.
Status Note: This migration guide is a working draft. It will be expanded with more examples, screenshots, and step‑by‑step checklists before the GridPlacement 6.0 release.
For detailed technical changes, see the Class Mapping Documentation in the plugin repository.