You’re right. The problem is that I cannot simply move each room template to the position given by the generator because the position must be transformed to fit the isometric grid. Here is a hotfix for you:
using UnityEngine;
namespace Edgar.Unity.IsometricFix
{
[CreateAssetMenu(menuName = "Edgar/Examples/Isometric 1/Position Fix", fileName = "Isometric1PositionFix")]
public class Isometric1PositionFix : DungeonGeneratorPostProcessBase
{
public override void Run(GeneratedLevel level, LevelDescription levelDescription)
{
var grid = level
.RootGameObject
.transform
.Find(GeneratorConstants.TilemapsRootName)
.GetComponent<Grid>();
foreach (var roomInstance in level.GetRoomInstances())
{
var correctPosition = grid.CellToWorld(roomInstance.Position);
roomInstance.RoomTemplateInstance.transform.position = correctPosition;
}
}
}
}
Add this file to your project, create an instance of the scriptable object, and drag and drop this instance to the “Custom post process tasks” list in the generator inspector.
It should fix both the colliders and the door positions. Let me know if that works.
