don't load water in headless mode

This commit is contained in:
in0finite 2021-07-22 15:56:59 +02:00
parent f9a6e11c53
commit 2991a3bbd6

View file

@ -1,6 +1,7 @@
using SanAndreasUnity.Importing.Items;
using SanAndreasUnity.Importing.Items.Placements;
using System.Linq;
using SanAndreasUnity.Utilities;
using UnityEngine;
namespace SanAndreasUnity.Behaviours.World
@ -12,6 +13,9 @@ namespace SanAndreasUnity.Behaviours.World
public void Initialize(WaterFile file)
{
if (F.IsInHeadlessMode)
return;
if (this.WaterPrefab == null)
{
Debug.LogError("No water prefab set, skipping load!");