fix for situation when LOD child is located in different render level

This commit is contained in:
in0finite 2019-10-20 20:17:06 +02:00
parent d872f163ac
commit 98bd42cf97

View file

@ -60,9 +60,12 @@ namespace SanAndreasUnity.Behaviours.World
if (_canLoad && Instance.LodInstance != null) if (_canLoad && Instance.LodInstance != null)
{ {
LodChild = dict[Instance.LodInstance]; if (dict.TryGetValue(Instance.LodInstance, out StaticGeometry dictValue))
{
LodChild = dictValue;
LodChild.LodParent = this; LodChild.LodParent = this;
} }
}
_isVisible = false; _isVisible = false;
gameObject.SetActive(false); gameObject.SetActive(false);