From 19c7650ddf0e9dafb5efc10e1506a755be2ccb43 Mon Sep 17 00:00:00 2001 From: shadeAlex Date: Mon, 2 Aug 2021 14:45:22 +0900 Subject: [PATCH] =?UTF-8?q?warning=20CS0618=E5=AF=BE=E7=AD=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/Editor/UIParticleEditor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/Editor/UIParticleEditor.cs b/Scripts/Editor/UIParticleEditor.cs index 7f0a4d0..82705df 100644 --- a/Scripts/Editor/UIParticleEditor.cs +++ b/Scripts/Editor/UIParticleEditor.cs @@ -216,7 +216,12 @@ namespace Coffee.UIExtensions var stage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage(); if (stage != null && stage.scene.isLoaded) { - PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, stage.prefabAssetPath); +#if UNITY_2020_1_OR_NEWER + string prefabAssetPath = stage.assetPath; +#else + string prefabAssetPath = stage.prefabAssetPath; +#endif + PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, prefabAssetPath); } #endif }