From 61760d940cdd4baacaa196ac1631a0a1a40b7204 Mon Sep 17 00:00:00 2001 From: shadeAlex Date: Mon, 2 Aug 2021 14:45:22 +0900 Subject: [PATCH] fix: fix for warning CS0618 --- 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 }