Missing Database Reference Hotfix

Database inspector was crashing when selecting a blueprint with missing ingredients
This commit is contained in:
hyperion51 2020-04-29 23:36:00 +01:00
commit 8d1b7bed28
10 changed files with 115 additions and 29 deletions

View file

@ -126,9 +126,12 @@ public class StrategyGameManager : MonoBehaviour
if (_currentTab == ZoneTabButton)
{
if (_populatedZone != _selectedZone && _cache.Get<ZoneData>(_selectedZone) != null)
var zone = _cache.Get<ZoneData>(_selectedZone);
if (_populatedZone != _selectedZone && zone != null)
PopulateZone();
Camera.transform.position = -Vector3.forward;
if (zone != null)
Camera.orthographicSize = zone.Radius * ZoneSizeScale;
}
if (_currentTab == TechTabButton)