From 3e0c352edc37ff866afeb668b79e2b0cdfcf9a44 Mon Sep 17 00:00:00 2001 From: Kohei-Yanagida Date: Tue, 17 Dec 2019 21:36:39 +0900 Subject: [PATCH] fix prefab revert error --- Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs b/Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs index f1acd2860..598e996c7 100644 --- a/Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs +++ b/Assets/VRM/UniVRM/Scripts/Format/VRMExportSettings.cs @@ -394,12 +394,15 @@ namespace VRM File.WriteAllBytes(path, bytes); Debug.LogFormat("Export elapsed {0}", sw.Elapsed); } - + if (IsPrefab(Source)) + { #if UNITY_2018_3_OR_NEWER - PrefabUtility.RevertPrefabInstance(Source, InteractionMode.AutomatedAction); + PrefabUtility.RevertPrefabInstance(Source, InteractionMode.AutomatedAction); #else - PrefabUtility.RevertPrefabInstance(target); + PrefabUtility.RevertPrefabInstance(target); #endif + } + if (path.StartsWithUnityAssetPath()) { AssetDatabase.ImportAsset(path.ToUnityRelativePath());