From 2991a3bbd6beae3e2e56ac5faa8a175e978b97e4 Mon Sep 17 00:00:00 2001 From: in0finite Date: Thu, 22 Jul 2021 15:56:59 +0200 Subject: [PATCH] don't load water in headless mode --- Assets/Scripts/Behaviours/World/Water.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Scripts/Behaviours/World/Water.cs b/Assets/Scripts/Behaviours/World/Water.cs index 9f50f057..9a2f982b 100644 --- a/Assets/Scripts/Behaviours/World/Water.cs +++ b/Assets/Scripts/Behaviours/World/Water.cs @@ -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!");