@@ -163,9 +163,6 @@ public void TestGetRelativePath ()
163
163
[ Test ]
164
164
public void TestGetSetFields ( )
165
165
{
166
- /* var defaultRelativePath = ExportSettings.GetRelativeSavePath ();
167
- Assert.AreEqual (ExportSettings.kDefaultSavePath, defaultRelativePath);
168
-
169
166
// the path to Assets but with platform-dependent separators
170
167
var appDataPath = Application . dataPath . Replace ( Path . AltDirectorySeparatorChar ,
171
168
Path . DirectorySeparatorChar ) ;
@@ -174,15 +171,28 @@ public void TestGetSetFields ()
174
171
var dataPath = Path . GetFullPath ( Path . Combine ( appDataPath , ExportSettings . kDefaultSavePath ) ) ;
175
172
Assert . AreEqual ( dataPath , defaultAbsolutePath ) ;
176
173
174
+ var prefabDefaultAbsPath = ExportSettings . GetPrefabAbsoluteSavePath ( ) ;
175
+ Assert . AreEqual ( dataPath , prefabDefaultAbsPath ) ;
176
+
177
177
// set; check that the saved value is platform-independent,
178
178
// that the relative path uses / like in unity,
179
179
// and that the absolute path is platform-specific
180
- ExportSettings.SetRelativeSavePath ("/a\\b/c/\\");
181
- var convertToModelSavePath = s_SavePathField.GetValue (ExportSettings.instance);
182
- Assert.AreEqual ("a/b/c", convertToModelSavePath);
183
- Assert.AreEqual ("a/b/c", ExportSettings.GetRelativeSavePath ());
180
+ ExportSettings . AddFbxSavePath ( "/a\\ b/c/\\ " ) ;
181
+ ExportSettings . AddPrefabSavePath ( "/a\\ b/c/\\ " ) ;
182
+
183
+ Assert . That ( ExportSettings . GetRelativeFbxSavePaths ( ) [ 0 ] , Is . EqualTo ( "Assets \u2044 a⁄b⁄c" ) ) ;
184
+ Assert . That ( ExportSettings . GetRelativePrefabSavePaths ( ) [ 0 ] , Is . EqualTo ( "Assets \u2044 a⁄b⁄c" ) ) ;
185
+
184
186
var platformPath = Path . Combine ( "a" , Path . Combine ( "b" , "c" ) ) ;
185
- Assert.AreEqual (Path.Combine (appDataPath, platformPath), ExportSettings.GetFbxAbsoluteSavePath ());*/
187
+ Assert . AreEqual ( Path . Combine ( appDataPath , platformPath ) , ExportSettings . GetFbxAbsoluteSavePath ( ) ) ;
188
+ Assert . AreEqual ( Path . Combine ( appDataPath , platformPath ) , ExportSettings . GetPrefabAbsoluteSavePath ( ) ) ;
189
+
190
+ ExportSettings . AddFbxSavePath ( "test" ) ;
191
+ ExportSettings . AddPrefabSavePath ( "test2" ) ;
192
+
193
+ // 3 including the default path
194
+ Assert . That ( ExportSettings . GetRelativeFbxSavePaths ( ) . Length , Is . EqualTo ( 3 ) ) ;
195
+ Assert . That ( ExportSettings . GetRelativePrefabSavePaths ( ) . Length , Is . EqualTo ( 3 ) ) ;
186
196
}
187
197
188
198
[ Test ]
0 commit comments