Skip to content

Commit 8d7124f

Browse files
committed
Fix unit test ContentManager state carrying over... whoops.
1 parent b943ef5 commit 8d7124f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Assets/Tests/OpenTS2/Content/ContentManagerTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public void ChangesEditAssetTest()
2525
TestCore.Initialize();
2626
var contentManager = ContentManager.Instance;
2727
contentManager.AddPackage("TestAssets/TestPackage.package");
28+
foreach(var entry in contentManager.ContentEntries)
29+
{
30+
UnityEngine.Debug.Log(entry.FilePath);
31+
}
2832
var stringAsset = contentManager.GetAsset<StringSetAsset>(new ResourceKey(1, "testpackage", TypeIDs.STR));
2933
Assert.IsNotNull(stringAsset);
3034

Assets/Tests/TestCore.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@
1313
/// </summary>
1414
public static class TestCore
1515
{
16-
static bool Initialized = false;
17-
1816
/// <summary>
1917
/// Initializes all singletons, systems and the game assembly.
2018
/// </summary>
2119
public static void Initialize()
2220
{
23-
if (Initialized)
24-
return;
2521
var settings = new Settings()
2622
{
2723
CustomContentEnabled = false,
@@ -35,6 +31,5 @@ public static void Initialize()
3531
CodecAttribute.Initialize();
3632
AssemblyHelper.InitializeLoadedAssemblies();
3733
VMPrimitiveRegistry.Initialize();
38-
Initialized = true;
3934
}
4035
}

0 commit comments

Comments
 (0)