Skip to content

Commit 3902e95

Browse files
committed
fix unit test
1 parent 0bf5867 commit 3902e95

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Assets/FbxExporters/Editor/FbxPrefabAutoUpdater.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ namespace FbxExporters
2323
/// </summary>
2424
public /*static*/ class FbxPrefabAutoUpdater : UnityEditor.AssetPostprocessor
2525
{
26+
public const string FBX_PREFAB_FILE = "/UnityFbxPrefab.dll";
27+
2628
public static string FindFbxPrefabAssetPath()
2729
{
2830
// Find guids that are scripts that look like FbxPrefab.
2931
// That catches FbxPrefabTest too, so we have to make sure.
3032
var allGuids = AssetDatabase.FindAssets("FbxPrefab t:MonoScript");
3133
foreach(var guid in allGuids) {
3234
var path = AssetDatabase.GUIDToAssetPath(guid);
33-
if (path.EndsWith ("/UnityFbxPrefab.dll")) {
35+
if (path.EndsWith (FBX_PREFAB_FILE)) {
3436
return path;
3537
}
3638
}

Assets/FbxExporters/Editor/UnitTests/FbxPrefabAutoUpdaterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void BasicTest ()
4747
{
4848
var fbxPrefabPath = FbxPrefabAutoUpdater.FindFbxPrefabAssetPath();
4949
Assert.IsFalse(string.IsNullOrEmpty(fbxPrefabPath));
50-
Assert.IsTrue(fbxPrefabPath.EndsWith("FbxPrefab.cs"));
50+
Assert.IsTrue(fbxPrefabPath.EndsWith(FbxPrefabAutoUpdater.FBX_PREFAB_FILE));
5151

5252
Assert.IsTrue(FbxPrefabAutoUpdater.IsFbxAsset("Assets/path/to/foo.fbx"));
5353
Assert.IsFalse(FbxPrefabAutoUpdater.IsFbxAsset("Assets/path/to/foo.png"));

0 commit comments

Comments
 (0)