mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-13 15:52:03 +07:00
separate Tiled layers sorting fix
This commit is contained in:
@@ -50,6 +50,8 @@ namespace IsoTools.Tiled.Internal {
|
||||
layer_go.transform.localPosition = IsoUtils.Vec3FromXY(
|
||||
layer_data.OffsetX / _asset.PixelsPerUnit,
|
||||
-layer_data.OffsetY / _asset.PixelsPerUnit);
|
||||
layer_go.transform.localPosition = IsoUtils.Vec3ChangeZ(
|
||||
layer_go.transform.localPosition, - layer_index * _asset.LayersDepthStep);
|
||||
layer_go.SetActive(layer_data.Visible);
|
||||
|
||||
var tiled_layer = layer_go.AddComponent<TiledMapLayer>();
|
||||
|
||||
@@ -45,8 +45,9 @@ namespace IsoTools.Tiled {
|
||||
|
||||
public class TiledMapAsset : ScriptableObject {
|
||||
//[HideInInspector]
|
||||
public TiledMapData Data = new TiledMapData();
|
||||
public string Name = string.Empty;
|
||||
public float PixelsPerUnit = 100.0f;
|
||||
public TiledMapData Data = new TiledMapData();
|
||||
public string Name = string.Empty;
|
||||
public float PixelsPerUnit = 100.0f;
|
||||
public float LayersDepthStep = IsoWorld.DefStepDepth;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user