mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
okay fuck it dont unload the shit cuz this error spam is annoying
This commit is contained in:
parent
66b26a7263
commit
0944f18930
@ -67,41 +67,20 @@ namespace NewHorizons.Handlers
|
|||||||
_objectCache[obj] = assetBundles;
|
_objectCache[obj] = assetBundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector)
|
|
||||||
{
|
|
||||||
// load it if ur already in the sector
|
|
||||||
if (sector.ContainsOccupant(DynamicOccupant.Player))
|
|
||||||
{
|
|
||||||
foreach (var assetBundle in assetBundles)
|
foreach (var assetBundle in assetBundles)
|
||||||
{
|
{
|
||||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sector.OnOccupantEnterSector += sectorDetector =>
|
if (sector)
|
||||||
|
{
|
||||||
|
sector.OnOccupantEnterSector += _ =>
|
||||||
{
|
{
|
||||||
if (sectorDetector.GetOccupantType() != DynamicOccupant.Player) return;
|
|
||||||
foreach (var assetBundle in assetBundles)
|
foreach (var assetBundle in assetBundles)
|
||||||
{
|
{
|
||||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
StreamingManager.LoadStreamingAssets(assetBundle);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
sector.OnOccupantExitSector += sectorDetector =>
|
|
||||||
{
|
|
||||||
if (sectorDetector.GetOccupantType() != DynamicOccupant.Player) return;
|
|
||||||
foreach (var assetBundle in assetBundles)
|
|
||||||
{
|
|
||||||
StreamingManager.UnloadStreamingAssets(assetBundle);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// just load it immediately and hope for the best
|
|
||||||
foreach (var assetBundle in assetBundles)
|
|
||||||
{
|
|
||||||
StreamingManager.LoadStreamingAssets(assetBundle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user