diff --git a/CHANGELOG.md b/CHANGELOG.md index eff4dfa..5b7c124 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [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) + + +### Bug Fixes + +* removed UIParticle will be saved in prefab mode ([08e2d51](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/08e2d51c73a294d44974e7fba35e2477f04e6860)) + # [3.0.0-preview.24](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.23...v3.0.0-preview.24) (2020-09-01) diff --git a/Scripts/Editor/UIParticleEditor.cs b/Scripts/Editor/UIParticleEditor.cs index d37d72d..45a010c 100644 --- a/Scripts/Editor/UIParticleEditor.cs +++ b/Scripts/Editor/UIParticleEditor.cs @@ -2,6 +2,7 @@ using UnityEditor; using UnityEditor.UI; using UnityEngine; using System.Collections.Generic; +using UnityEditor.Experimental.SceneManagement; using UnityEditorInternal; using UnityEngine.UI; @@ -150,6 +151,12 @@ namespace Coffee.UIExtensions var cr = p.canvasRenderer; DestroyImmediate(p); DestroyImmediate(cr); + + var stage = PrefabStageUtility.GetCurrentPrefabStage(); + if (stage != null && stage.scene.isLoaded) + { + PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, stage.prefabAssetPath); + } } bool FixButton(bool show, string text) diff --git a/package.json b/package.json index 19f37be..755dd01 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.24", + "version": "3.0.0-preview.25", "unity": "2018.2", "license": "MIT", "repository": {