Skip to content

Commit 281a095

Browse files
committed
Updated blendshape converter on example race. Fixed cross compatible races.
1 parent 5df0d6d commit 281a095

File tree

5 files changed

+3068
-2935
lines changed

5 files changed

+3068
-2935
lines changed

UMAProject/Assets/UMA/Core/Scripts/UMAAssetIndexer.cs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
using UnityEngine.SceneManagement;
2727
using System.Text;
28+
using System.Collections;
2829

2930

3031
namespace UMA
@@ -2447,16 +2448,41 @@ public int GetHashCode(UMAWardrobeRecipe bx)
24472448

24482449
private void AddRaceRecipe(UMAWardrobeRecipe uwr)
24492450
{
2451+
24502452
if (!uwr)
24512453
{
24522454
return;
24532455
}
2456+
2457+
Dictionary<string, AssetItem> TypeDic;
2458+
TypeDic = GetAssetDictionary(typeof(RaceData));
2459+
24542460
// if (req == null)
24552461
// req = new recipeEqualityComparer();
2462+
List<string> CompatibleRaces = new List<string>(uwr.compatibleRaces);
24562463

2457-
for (int i = 0; i < uwr.compatibleRaces.Count; i++)
2464+
List<string> AdditionalRaces = new List<string>();
2465+
2466+
foreach (string s in CompatibleRaces)
2467+
{
2468+
RaceData r = GetAsset<RaceData>(s);
2469+
if (r != null && !AdditionalRaces.Contains(r.name))
2470+
{
2471+
if (r.IsCrossCompatibleWith(s))
2472+
{
2473+
if (!AdditionalRaces.Contains(r.name) && !CompatibleRaces.Contains(r.name))
2474+
{
2475+
AdditionalRaces.Add(r.name);
2476+
}
2477+
}
2478+
}
2479+
}
2480+
CompatibleRaces.AddRange(AdditionalRaces);
2481+
2482+
2483+
for (int i = 0; i < CompatibleRaces.Count; i++)
24582484
{
2459-
string racename = uwr.compatibleRaces[i];
2485+
string racename = CompatibleRaces[i];
24602486
if (!raceRecipes.ContainsKey(racename))
24612487
{
24622488
raceRecipes.Add(racename, new SlotRecipes());

0 commit comments

Comments
 (0)