Skip to content

Commit 90b69be

Browse files
committed
fix: ScaleEntities now properly reimports separate levels when changed
1 parent bebd093 commit 90b69be

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkConfigImporterEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public override void OnInspectorGUI()
1616
{
1717
const string msg = "This file is generated by the project importer.\n" +
1818
"It contains the configuration data from the project inspector.\n" +
19-
"It is only used for telling the levels to reimport when this is changed.";
19+
"It is only used for telling separate levels to reimport when this has different values.";
2020
EditorGUILayout.HelpBox(msg, MessageType.Info);
2121
ApplyRevertGUI();
2222
}

Assets/LDtkUnity/Editor/ScriptedImporter/LDtkProjectImporter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ private void GenerateConfigurationFile(LdtkJson json)
265265
//only generate the file if separate levels is used
266266
if (!json.ExternalLevels) return;
267267

268+
//note: should populate any values that should determine if separate levels should reimport
268269
LDtkConfigData config = new LDtkConfigData()
269270
{
270271
PixelsPerUnit = _pixelsPerUnit,
@@ -277,6 +278,7 @@ private void GenerateConfigurationFile(LdtkJson json)
277278
UseParallax = _useParallax,
278279
IntGridValues = _intGridValues,
279280
Entities = _entities,
281+
ScaleEntities = _scaleEntities,
280282
};
281283
string writePath = config.WriteJson(assetPath);
282284

Assets/LDtkUnity/Editor/Utility/Artifacts/LDtkConfigData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ internal struct LDtkConfigData
1919
public bool CreateBackgroundColor;
2020
public bool CreateLevelBoundsTrigger;
2121
public bool UseParallax;
22+
public bool ScaleEntities;
2223
public LDtkAssetIntGridValue[] IntGridValues;
2324
public LDtkAssetEntity[] Entities;
2425

0 commit comments

Comments
 (0)