Skip to content

Commit

Permalink
feat: updated TMP fonts build processor
Browse files Browse the repository at this point in the history
  • Loading branch information
dre0dru committed Dec 27, 2021
1 parent 9e67c81 commit a0ab4e1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"rootNamespace": "AddressableAssets",
"references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:dc829289c42011f49b6e47e0f9be73c5"
"GUID:dc829289c42011f49b6e47e0f9be73c5",
"GUID:fd5f941de35185746a53d8989ff12e91"
],
"includePlatforms": [
"Editor"
Expand All @@ -19,6 +20,11 @@
"name": "com.unity.textmeshpro",
"expression": "",
"define": "TEXTMESHPRO"
},
{
"name": "com.dre0dru.shared.sources",
"expression": "",
"define": "SHARED_SOURCES"
}
],
"noEngineReferences": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#if TEXTMESHPRO
#if TEXTMESHPRO && SHARED_SOURCES

using Shared.Sources.Editor;
using Shared.Sources.CustomDrawers;
using TMPro;
using UnityEngine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if TEXTMESHPRO
#if TEXTMESHPRO && SHARED_SOURCES

using System.IO;
using Shared.Sources.Editor;
Expand Down Expand Up @@ -52,12 +52,12 @@ private bool IsEnabled(out TMPBuildProcessorSettings buildProcessorSettings)

private string GetBuildFolderPath(TMPBuildProcessorSettings buildProcessorSettings)
{
return Path.Combine(buildProcessorSettings.DestinationFolder.Path, GetAssetName(buildProcessorSettings));
return Path.Combine(AssetDatabase.GUIDToAssetPath(buildProcessorSettings.DestinationFolder.GUID), GetAssetName(buildProcessorSettings));
}

private string GetIgnoreFolderPath(TMPBuildProcessorSettings buildProcessorSettings)
{
return Path.Combine(buildProcessorSettings.SourceFolder.Path, GetAssetName(buildProcessorSettings));
return Path.Combine(AssetDatabase.GUIDToAssetPath(buildProcessorSettings.SourceFolder.GUID), GetAssetName(buildProcessorSettings));
}

private string GetAssetName(TMPBuildProcessorSettings buildProcessorSettings)
Expand Down
2 changes: 1 addition & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"depth": 0,
"source": "git",
"dependencies": {},
"hash": "84c8ccc65504d6355cf9fe3d707ce3be1e41bc82"
"hash": "079cc042aa1e22dcc3e8383b78d17a5c60a45309"
},
"com.jeffjadulco.guidregenerator": {
"version": "https://github.com/jeffjadulco/unity-guid-regenerator.git",
Expand Down

0 comments on commit a0ab4e1

Please sign in to comment.