mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
le warning
This commit is contained in:
parent
cb99996451
commit
754e17968a
@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Handlers
|
||||
{
|
||||
@ -72,16 +73,20 @@ namespace NewHorizons.Handlers
|
||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||
}
|
||||
|
||||
if (sector)
|
||||
if (!sector)
|
||||
{
|
||||
sector.OnOccupantEnterSector += _ =>
|
||||
{
|
||||
foreach (var assetBundle in assetBundles)
|
||||
{
|
||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||
}
|
||||
};
|
||||
Logger.LogWarning($"StreamingHandler for {obj} has null sector." +
|
||||
$"This can lead to the thing being unloaded permanently.");
|
||||
return;
|
||||
}
|
||||
|
||||
sector.OnOccupantEnterSector += _ =>
|
||||
{
|
||||
foreach (var assetBundle in assetBundles)
|
||||
{
|
||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user