Skip to content

Commit cbdd4ef

Browse files
committed
fix default selection unit test compile issues
1 parent 2edfd43 commit cbdd4ef

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Assets/FbxExporters/Editor/UnitTests/DefaultSelectionTest.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO;
66
using System.Collections.Generic;
77
using Unity.FbxSdk;
8+
using FbxExporters.EditorTools;
89

910
namespace FbxExporters.UnitTests
1011
{
@@ -16,13 +17,13 @@ namespace FbxExporters.UnitTests
1617
public class DefaultSelectionTest : ExporterTestBase
1718
{
1819
protected GameObject m_root;
19-
protected bool m_centerObjectsSetting;
20+
protected ExportModelSettingsSerialize.ObjectPosition m_centerObjectsSetting;
2021

2122
[SetUp]
2223
public override void Init ()
2324
{
2425
base.Init();
25-
m_centerObjectsSetting = FbxExporters.EditorTools.ExportSettings.instance.centerObjects;
26+
m_centerObjectsSetting = FbxExporters.EditorTools.ExportSettings.GetObjectPosition();
2627
}
2728

2829
[TearDown]
@@ -33,7 +34,7 @@ public override void Term ()
3334
UnityEngine.Object.DestroyImmediate (m_root);
3435
}
3536
// restore original setting
36-
FbxExporters.EditorTools.ExportSettings.instance.centerObjects = m_centerObjectsSetting;
37+
FbxExporters.EditorTools.ExportSettings.SetObjectPosition(m_centerObjectsSetting);
3738
}
3839

3940
[Test]
@@ -62,7 +63,7 @@ public void TestDefaultSelection ()
6263
Assert.IsNotNull (m_root);
6364

6465
// test without centered objects
65-
FbxExporters.EditorTools.ExportSettings.instance.centerObjects = false;
66+
FbxExporters.EditorTools.ExportSettings.SetObjectPosition(ExportModelSettingsSerialize.ObjectPosition.WorldAbsolute);
6667

6768
// test Export Root
6869
// Expected result: everything gets exported
@@ -97,7 +98,7 @@ public void TestDefaultSelection ()
9798
var goExportSet = new GameObject[]{ child2.gameObject, parent2.gameObject };
9899

99100
// test without centering objects
100-
FbxExporters.EditorTools.ExportSettings.instance.centerObjects = false;
101+
FbxExporters.EditorTools.ExportSettings.SetObjectPosition(ExportModelSettingsSerialize.ObjectPosition.WorldAbsolute);
101102

102103
exportedRoot = ExportSelection (exportSet);
103104
List<GameObject> children = new List<GameObject> ();
@@ -107,7 +108,7 @@ public void TestDefaultSelection ()
107108
CompareHierarchies (new GameObject[]{ child2, parent2.gameObject }, children.ToArray ());
108109

109110
// test with centered objects
110-
FbxExporters.EditorTools.ExportSettings.instance.centerObjects = true;
111+
FbxExporters.EditorTools.ExportSettings.SetObjectPosition(ExportModelSettingsSerialize.ObjectPosition.LocalCentered);
111112
var newCenter = FbxExporters.Editor.ModelExporter.FindCenter (goExportSet);
112113

113114
exportedRoot = ExportSelection (exportSet);

0 commit comments

Comments
 (0)