mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 12:05:23 +01:00
Fix atmospherebuilder cull group (affected hazydreams)
This commit is contained in:
parent
0633470297
commit
dd7bcbd5b1
@ -100,6 +100,15 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
atmoGO.transform.position = planetGO.transform.TransformPoint(Vector3.zero);
|
||||
atmoGO.SetActive(true);
|
||||
|
||||
// CullGroups have already set up their renderers when this is done so we need to add ourself to it
|
||||
// TODO: There are probably other builders where this is relevant
|
||||
// This in particular was a bug affecting hazy dreams
|
||||
if (sector != null && sector.gameObject.GetComponent<CullGroup>() is CullGroup cullGroup)
|
||||
{
|
||||
cullGroup.RecursivelyAddRenderers(atmoGO.transform, true);
|
||||
cullGroup.SetVisible(cullGroup.IsVisible());
|
||||
}
|
||||
|
||||
return atmoGO;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user