What problem does it solve?
This Skill guides developers in creating intuitive and consistent ECS component editors for the editor's Properties panel. It ensures proper UI for various property types (vectors, primitives) and seamless integration with the ComponentEditorRegistry and Dependency Injection, preventing fragmented or poorly styled component UIs.
Core Features & Use Cases
- IComponentEditor Interface: Implement the core interface for all component editors.
- Consistent UI Wrapper: Utilize
ComponentEditorRegistry.DrawComponent for standardized collapsible UI, component headers, and remove buttons.
- Vector Controls: Use
VectorPanel for axis-colored vector (Vector2/Vector3) controls with reset functionality.
- Primitive Property Editing: Leverage
UIPropertyRenderer for simple int, float, bool, string properties.
- DI Registration: Ensure component editors are correctly registered in the DryIoc container.
- Use Case: To create an editor for a new
HealthComponent, this Skill guides you to use ComponentEditorRegistry.DrawComponent for the overall structure, UIPropertyRenderer for an integer MaxHealth property, and VectorPanel for a RespawnPosition (Vector3) property.
Quick Start
Guide me through creating a new component editor for a HealthComponent that displays an integer Health property and a Vector3 SpawnPosition property.