-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
23,963 additions
and
11,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkConfigImporterEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using UnityEditor; | ||
|
||
#if UNITY_2020_2_OR_NEWER | ||
using UnityEditor.AssetImporters; | ||
#else | ||
using UnityEditor.Experimental.AssetImporters; | ||
#endif | ||
|
||
namespace LDtkUnity.Editor | ||
{ | ||
[CanEditMultipleObjects] | ||
[CustomEditor(typeof(LDtkConfigImporter))] | ||
internal sealed class LDtkConfigImporterEditor : ScriptedImporterEditor | ||
{ | ||
public override void OnInspectorGUI() | ||
{ | ||
const string msg = "This file is generated by the project importer.\n" + | ||
"It contains the configuration data from the project inspector.\n" + | ||
"It is only used for telling the levels to reimport when this is changed."; | ||
EditorGUILayout.HelpBox(msg, MessageType.Info); | ||
ApplyRevertGUI(); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/LDtkUnity/Editor/CustomEditor/Importer/LDtkConfigImporterEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Assets/LDtkUnity/Editor/ScriptedImporter/LDtkConfigImporter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using UnityEngine; | ||
|
||
#if UNITY_2020_2_OR_NEWER | ||
using UnityEditor.AssetImporters; | ||
#else | ||
using UnityEditor.Experimental.AssetImporters; | ||
#endif | ||
|
||
namespace LDtkUnity.Editor | ||
{ | ||
[ScriptedImporter(LDtkImporterConsts.CONFIG_VERSION, LDtkImporterConsts.CONFIG_EXT, LDtkImporterConsts.CONFIG_ORDER)] | ||
internal sealed class LDtkConfigImporter : ScriptedImporter | ||
{ | ||
public override void OnImportAsset(AssetImportContext ctx) | ||
{ | ||
LDtkConfigData data = LDtkConfigData.ReadJson(assetPath); | ||
|
||
LDtkConfig obj = ScriptableObject.CreateInstance<LDtkConfig>(); | ||
obj._data = data; | ||
|
||
ctx.AddObjectToAsset("main", obj, LDtkIconUtility.LoadListIcon()); | ||
ctx.SetMainObject(obj); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/LDtkUnity/Editor/ScriptedImporter/LDtkConfigImporter.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using UnityEngine; | ||
|
||
namespace LDtkUnity.Editor | ||
{ | ||
/// <summary> | ||
/// Purely a class to hold the LDtkConfigData as an import artifact | ||
/// </summary> | ||
internal sealed class LDtkConfig : ScriptableObject | ||
{ | ||
public LDtkConfigData _data; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/LDtkUnity/Editor/Utility/Artifacts/LDtkConfig.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.