From d168463017337b0464ac474a2cb8ccfa570a3a2d Mon Sep 17 00:00:00 2001 From: Bruno Mikoski Date: Mon, 7 Mar 2022 18:41:51 +0000 Subject: [PATCH] fix: batch mode issue --- CHANGELOG.MD | 5 +++++ Scripts/Editor/SceneStateKeeper.cs | 3 +++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 083b22f..3470e4a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.4] +### Changed +- Fixed batch mode issue + ## [0.1.3] ### Changed - Fixed an issue where new Hierarchy Window would be created if they where hidden. @@ -46,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### [Unreleased] +[0.1.4]: https://github.com/brunomikoski/SceneKeeper/releases/tag/v0.1.4~~~~ [0.1.3]: https://github.com/brunomikoski/SceneKeeper/releases/tag/v0.1.3 [0.1.2]: https://github.com/brunomikoski/SceneKeeper/releases/tag/v0.1.2 [0.1.1]: https://github.com/brunomikoski/SceneKeeper/releases/tag/v0.1.1 diff --git a/Scripts/Editor/SceneStateKeeper.cs b/Scripts/Editor/SceneStateKeeper.cs index 8b50d44..396a67e 100644 --- a/Scripts/Editor/SceneStateKeeper.cs +++ b/Scripts/Editor/SceneStateKeeper.cs @@ -34,6 +34,9 @@ private static SceneData SceneData static SceneStateKeeper() { + if (Application.isBatchMode) + return; + EditorSceneManager.sceneOpened += OnSceneOpened; SceneManager.sceneLoaded += OnSceneLoaded; EditorSceneManager.sceneClosing += OnSceneClosing; diff --git a/package.json b/package.json index 973457f..f997a84 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.brunomikoski.scenekeeper", "displayName": "Scene Keeper", - "version": "0.1.3", + "version": "0.1.4", "unity": "2018.4", "description": "A tool that keeps your scene hierarchy between editor/play time, and opening and close scene", "keywords": [