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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Logger = NewHorizons.Utility.Logger;
|
||||||
|
|
||||||
namespace NewHorizons.Handlers
|
namespace NewHorizons.Handlers
|
||||||
{
|
{
|
||||||
@ -72,16 +73,20 @@ namespace NewHorizons.Handlers
|
|||||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector)
|
if (!sector)
|
||||||
{
|
{
|
||||||
sector.OnOccupantEnterSector += _ =>
|
Logger.LogWarning($"StreamingHandler for {obj} has null sector." +
|
||||||
{
|
$"This can lead to the thing being unloaded permanently.");
|
||||||
foreach (var assetBundle in assetBundles)
|
return;
|
||||||
{
|
|
||||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sector.OnOccupantEnterSector += _ =>
|
||||||
|
{
|
||||||
|
foreach (var assetBundle in assetBundles)
|
||||||
|
{
|
||||||
|
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user