From 64e6c38b81fd34d88f5d9cf3e42b7ffc76de6849 Mon Sep 17 00:00:00 2001 From: osculton Date: Wed, 17 Feb 2016 16:01:58 +0100 Subject: [PATCH] Fixed Bug at Saving shared colors of overlaydata. --- .../Example/Scripts/UMAPackedRecipeBase.cs | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/UMAProject/Assets/UMA/Example/Scripts/UMAPackedRecipeBase.cs b/UMAProject/Assets/UMA/Example/Scripts/UMAPackedRecipeBase.cs index 7c72922a..391bc1ec 100644 --- a/UMAProject/Assets/UMA/Example/Scripts/UMAPackedRecipeBase.cs +++ b/UMAProject/Assets/UMA/Example/Scripts/UMAPackedRecipeBase.cs @@ -384,7 +384,7 @@ public static UMAPackRecipe PackRecipeV2(UMA.UMAData.UMARecipe umaRecipe) for (int i = 0; i < umaPackRecipe.sharedColorCount; i++) { colorEntries.Add(umaRecipe.sharedColors[i]); - packedColorEntries.Add(new PackedOverlayColorDataV3(umaRecipe.sharedColors[i])); + packedColorEntries.Add(new PackedOverlayColorDataV3(umaRecipe.sharedColors[i])); } for (int i = 0; i < slotCount; i++) @@ -427,25 +427,27 @@ public static UMAPackRecipe PackRecipeV2(UMA.UMAData.UMARecipe umaRecipe) tempPackedOverlay.rect[3] = Mathf.FloorToInt(overlayData.rect.height); OverlayColorData colorData = overlayData.colorData; - // Could not use IndexOf to find color, since operator == overriden in OverlayColorData - int colorIndex = -1; - for (int col=0;col