You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up from a conversation on the LDtk discord.
Turns out you've made a bunch of changes to the project since I grabbed the source, so making a PR wouldn't be trivial. Here's a patch of the changes instead if you want to take a look.
Pulling the tile resolution from the Unity Texture Asset
A simple extension pattern to allow defining a path mapper outside of the LDtk source
These changes allow remapping of the tileset art to a different file, with a different tile resolution, allowing the use of HD tilesets (keeping low-res tilesets in LDtk which doesn't support high-res tiles).
Here's what the path mapper looks like on my side:
[InitializeOnLoad]publicstaticclassAssetProcessingExtensionsInitializer{staticAssetProcessingExtensionsInitializer(){
Debug.Log("AssetProcessingExtensionsInitializer");
AssetProcessingExtensions.RegisterAssetPathMapper(new AssetPathMapper());}}publicclassAssetPathMapper:IAssetPathMapper{publicstringMapAssetPath(stringpath){varoutPath= path;if(outPath.EndsWith("SD.png")){varhd= outPath.Replace("SD.png","HD.png");if(File.Exists(hd)){outPath=hd;}}if(path!=outPath){
Debug.Log($"Remapped {path} to {outPath}");}returnoutPath;}}
The text was updated successfully, but these errors were encountered:
This issue is a little old, but it would be a great feature. Working with small resolution in LDTK and then the possibility to replace with high resolution assets when importing in Unity would be awesome
+1 to implement this feature
sigrist
added a commit
to sigrist/LDtkToUnity
that referenced
this issue
Jul 17, 2022
Hey,
Following up from a conversation on the LDtk discord.
Turns out you've made a bunch of changes to the project since I grabbed the source, so making a PR wouldn't be trivial. Here's a patch of the changes instead if you want to take a look.
ldtk-asset-proc-changes.patch.txt
This includes 2 changes:
These changes allow remapping of the tileset art to a different file, with a different tile resolution, allowing the use of HD tilesets (keeping low-res tilesets in LDtk which doesn't support high-res tiles).
Here's what the path mapper looks like on my side:
The text was updated successfully, but these errors were encountered: