File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,16 @@ namespace FbxExporters
23
23
/// </summary>
24
24
public /*static*/ class FbxPrefabAutoUpdater : UnityEditor . AssetPostprocessor
25
25
{
26
+ public const string FBX_PREFAB_FILE = "/UnityFbxPrefab.dll" ;
27
+
26
28
public static string FindFbxPrefabAssetPath ( )
27
29
{
28
30
// Find guids that are scripts that look like FbxPrefab.
29
31
// That catches FbxPrefabTest too, so we have to make sure.
30
32
var allGuids = AssetDatabase . FindAssets ( "FbxPrefab t:MonoScript" ) ;
31
33
foreach ( var guid in allGuids ) {
32
34
var path = AssetDatabase . GUIDToAssetPath ( guid ) ;
33
- if ( path . EndsWith ( "/UnityFbxPrefab.dll" ) ) {
35
+ if ( path . EndsWith ( FBX_PREFAB_FILE ) ) {
34
36
return path ;
35
37
}
36
38
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public void BasicTest ()
47
47
{
48
48
var fbxPrefabPath = FbxPrefabAutoUpdater . FindFbxPrefabAssetPath ( ) ;
49
49
Assert . IsFalse ( string . IsNullOrEmpty ( fbxPrefabPath ) ) ;
50
- Assert . IsTrue ( fbxPrefabPath . EndsWith ( "FbxPrefab.cs" ) ) ;
50
+ Assert . IsTrue ( fbxPrefabPath . EndsWith ( FbxPrefabAutoUpdater . FBX_PREFAB_FILE ) ) ;
51
51
52
52
Assert . IsTrue ( FbxPrefabAutoUpdater . IsFbxAsset ( "Assets/path/to/foo.fbx" ) ) ;
53
53
Assert . IsFalse ( FbxPrefabAutoUpdater . IsFbxAsset ( "Assets/path/to/foo.png" ) ) ;
You can’t perform that action at this time.
0 commit comments