public static Transform GetNamingMatch(Transform[] transforms, params string[][] namings) { foreach (Transform transform in transforms) { bool flag = true; foreach (string namingConvention in namings) { if (!BipedNaming.matchesNaming(transform.name, namingConvention)) { flag = false; break; } } if (flag) { return(transform); } } return(null); }
public static Transform GetNamingMatch(Transform[] transforms, params string[][] namings) { for (int i = 0; i < transforms.Length; i++) { Transform transform = transforms[i]; bool flag = true; for (int j = 0; j < namings.Length; j++) { string[] namingConvention = namings[j]; if (!BipedNaming.matchesNaming(transform.name, namingConvention)) { flag = false; break; } } if (flag) { return(transform); } } return(null); }
private static bool isTypeExclude(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeExclude)); }
private static bool isEye(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeEye) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeEye)); }
private static bool isTail(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeTail) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeTail)); }
private static bool isHead(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeHead) && !BipedNaming.excludesNaming(boneName, BipedNaming.typeExcludeHead)); }
private static bool isRight(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeRight) || BipedNaming.lastLetter(boneName) == "R" || BipedNaming.firstLetter(boneName) == "R"); }
private static bool isLeft(string boneName) { return(BipedNaming.matchesNaming(boneName, BipedNaming.typeLeft) || BipedNaming.lastLetter(boneName) == "L" || BipedNaming.firstLetter(boneName) == "L"); }