From eafc615ea645baa949127b91adb56dda06269426 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 1 Sep 2020 07:03:06 +0000 Subject: [PATCH] 3.0.0-preview.26 # [3.0.0-preview.26](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.25...v3.0.0-preview.26) (2020-09-01) ### Bug Fixes * in Unity 2018.2, PrefabStageUtility is not found ([0b6dcff](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0b6dcff5d6356db497532daa0a26804852e8de24)) --- CHANGELOG.md | 7 +++++++ Scripts/Editor/UIParticleEditor.cs | 5 +++-- package.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b7c124..ccf38c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [3.0.0-preview.26](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.25...v3.0.0-preview.26) (2020-09-01) + + +### Bug Fixes + +* in Unity 2018.2, PrefabStageUtility is not found ([0b6dcff](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0b6dcff5d6356db497532daa0a26804852e8de24)) + # [3.0.0-preview.25](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.24...v3.0.0-preview.25) (2020-09-01) diff --git a/Scripts/Editor/UIParticleEditor.cs b/Scripts/Editor/UIParticleEditor.cs index 45a010c..921c351 100644 --- a/Scripts/Editor/UIParticleEditor.cs +++ b/Scripts/Editor/UIParticleEditor.cs @@ -2,7 +2,6 @@ using UnityEditor; using UnityEditor.UI; using UnityEngine; using System.Collections.Generic; -using UnityEditor.Experimental.SceneManagement; using UnityEditorInternal; using UnityEngine.UI; @@ -152,11 +151,13 @@ namespace Coffee.UIExtensions DestroyImmediate(p); DestroyImmediate(cr); - var stage = PrefabStageUtility.GetCurrentPrefabStage(); +#if UNITY_2018_3_OR_NEWER + var stage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage(); if (stage != null && stage.scene.isLoaded) { PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, stage.prefabAssetPath); } +#endif } bool FixButton(bool show, string text) diff --git a/package.json b/package.json index 755dd01..483a1ac 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.ui-particle", "displayName": "UI Particle", "description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.", - "version": "3.0.0-preview.25", + "version": "3.0.0-preview.26", "unity": "2018.2", "license": "MIT", "repository": {