This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
feat: Implement Unity Tilemap adapter #1
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
🔗 Is your feature request related to a specific issue?
The core library Lunar.Core.Base defines an abstract TilemapBase class intended for Tiled integration, but there is no concrete implementation for the Unity engine. This prevents the framework from rendering or interacting with Tiled maps inside Unity, making the core feature unusable in a Unity environment.
💡 Feature Description
- Expected outcome or effect: A concrete implementation of
TilemapBasethat works as a Unity adapter for Tiled maps. This will allow theLunarframework to load and display maps exported from Tiled within Unity. - Specific implementation ideas, such as classes, methods, parameters, or API design:
- Provide a Unity-side adapter that inherits from
TilemapBase. - The adapter should interpret Tiled map data and map it onto Unity’s tile rendering system.
- Core methods like tile retrieval, placement, and layer handling should delegate to Unity APIs internally.
- Provide a Unity-side adapter that inherits from
- Usage scenarios or benefits: Enables seamless use of Tiled editor maps inside Unity while still programming against the abstract
Lunar.Coreinterfaces. Developers can design levels in Tiled and then load them directly in Unity without writing their own importer or renderer. - Engine-specific context: Works in both Editor and Play mode. Targets all platforms supported by Unity. Compatible with Mono and IL2CPP scripting backends.
- Engine name & version: Unity 2021.3 LTS or later.
⚖ Alternatives Considered
- Custom tilemap renderer: We considered creating a fully custom renderer using sprites or meshes. This approach was rejected because Unity already provides an efficient 2D Tilemap system, and the main challenge is adapting Tiled data—not reimplementing rendering logic.
📝 Additional Information
- Example Usage: A
TiledMapLoaderfrom theLunarproject could parse a Tiled.tmxmap file and then instantiate a prefab. This prefab would contain aGridobject with a childTilemapthat has theUnityTiledTilemapAdaptercomponent attached. The loader would then interact with the adapter via itsTilemapBaseinterface to populate tiles according to the Tiled map data.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog