Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ private XElement CreatePrefabElement()
foreach (var collisionLayer in layer.CollisionLayers)
{
var collisionElements = CreateCollisionElementForLayer(collisionLayer);
AssignUnityProperties(collisionLayer, collisionElements, PrefabContext.TiledLayer);
AssignTiledProperties(collisionLayer, collisionElements);
layerElement.Add(collisionElements);
}
}
Expand Down
4 changes: 4 additions & 0 deletions tool/Tiled2Unity/Tiled2UnityLib/TmxClasses/TmxHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ public static TmxProperties GetPropertiesWithTypeDefaults(TmxHasProperties hasPr
{
TmxObject tmxObject = hasProperties as TmxObject;
objectTypeName = tmxObject.Type;
} else if (hasProperties is TmxLayer)
{
TmxLayer tmxLayer = hasProperties as TmxLayer;
objectTypeName = tmxLayer.Name;
}

// If an object type has been found then copy over all the default values for properties
Expand Down