From 3905766807bfa3eadd476768345862ed15a7452f Mon Sep 17 00:00:00 2001 From: Stanislav Osipov Date: Sun, 18 Oct 2020 13:04:11 +0300 Subject: [PATCH] fix: build fix / scene validation fix --- .../Runtime/Statis/AdditiveScenesLoader.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/com.stansassets.scene-management/Runtime/Statis/AdditiveScenesLoader.cs b/com.stansassets.scene-management/Runtime/Statis/AdditiveScenesLoader.cs index ab65a3f..63a5cfb 100644 --- a/com.stansassets.scene-management/Runtime/Statis/AdditiveScenesLoader.cs +++ b/com.stansassets.scene-management/Runtime/Statis/AdditiveScenesLoader.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using StansAssets.SceneManagement.Build; -using UnityEditor; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; @@ -64,9 +63,8 @@ public static IAsyncOperation LoadAdditively(string sceneName, Action loa { return LoadAddressableAdditively(sceneName, loadCompleted); } - else { - return LoadAdditively(sceneName, -1, loadCompleted); - } + + return LoadAdditively(sceneName, -1, loadCompleted); } static IAsyncOperation LoadAdditively(string sceneName, int buildIndex, Action loadCompleted = null) @@ -395,13 +393,14 @@ static bool ValidateScene(string sceneName) { if (BuildConfigurationSettings.Instance.HasValidConfiguration) { return BuildConfigurationSettings.Instance.Configuration.HasScene(sceneName); } - return SceneManager.GetSceneByName(sceneName).IsValid(); + + return true; } } static class AddressablesLogger { - public static bool Verbose = false; + public static readonly bool Verbose = false; public static void Log(string msg) {