From a75191b16056d5b9e7a32177588cd5acbeb1e54c Mon Sep 17 00:00:00 2001 From: liqi Date: Tue, 16 Mar 2021 10:52:50 +0800 Subject: [PATCH] Fixing the sourceAvatar set to null results in the avatarSetup being forced to change to CreateFromThisModel,so the configured avatarSetup value cannot be applied correctly, which is a timing error. --- Editor/System/Importers/ModelImporterConfigurator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Editor/System/Importers/ModelImporterConfigurator.cs b/Editor/System/Importers/ModelImporterConfigurator.cs index bbb73533..b37920c1 100644 --- a/Editor/System/Importers/ModelImporterConfigurator.cs +++ b/Editor/System/Importers/ModelImporterConfigurator.cs @@ -427,6 +427,9 @@ private void OverwriteImportSettings(ModelImporter target, ModelImporter referen target.animationType = reference.animationType; target.animationWrapMode = reference.animationWrapMode; + //Fixing the sourceAvatar set to null results in the avatarSetup being forced to change to CreateFromThisModel, + //so the configured avatarSetup value cannot be applied correctly, which is a timing error. + target.sourceAvatar = reference.sourceAvatar; #if UNITY_2019_3_OR_NEWER target.avatarSetup = reference.avatarSetup; #endif @@ -510,8 +513,6 @@ private void OverwriteImportSettings(ModelImporter target, ModelImporter referen target.skinWeights = reference.skinWeights; target.sortHierarchyByName = reference.sortHierarchyByName; #endif - - target.sourceAvatar = reference.sourceAvatar; target.swapUVChannels = reference.swapUVChannels; target.useFileScale = reference.useFileScale; target.useFileUnits = reference.useFileUnits;