public static string[] GetAvatarHumanAndActiveExtraTransforms(SerializedObject so, SerializedProperty transformMaskProperty, string[] refTransformsPath) { SerializedProperty serializedProperty = so.FindProperty(AvatarMaskUtility.sHuman); string[] result; if (serializedProperty == null || !serializedProperty.isArray) { result = null; } else { List <string> list = new List <string>(); for (int i = 0; i < serializedProperty.arraySize; i++) { SerializedProperty serializedProperty2 = serializedProperty.GetArrayElementAtIndex(i).FindPropertyRelative(AvatarMaskUtility.sBoneName); list.Add(serializedProperty2.stringValue); } List <string> list2 = new List <string>(AvatarMaskUtility.TokeniseHumanTransformsPath(refTransformsPath, list.ToArray())); for (int j = 0; j < transformMaskProperty.arraySize; j++) { float floatValue = transformMaskProperty.GetArrayElementAtIndex(j).FindPropertyRelative("m_Weight").floatValue; string stringValue = transformMaskProperty.GetArrayElementAtIndex(j).FindPropertyRelative("m_Path").stringValue; if (floatValue > 0f && !list2.Contains(stringValue)) { list2.Add(stringValue); } } result = list2.ToArray(); } return(result); }
public static string[] GetAvatarHumanTransform(SerializedObject so, string[] refTransformsPath) { SerializedProperty serializedProperty = so.FindProperty(AvatarMaskUtility.sHuman); if (serializedProperty == null || !serializedProperty.isArray) { return(null); } string[] humanTransforms = new string[0]; for (int i = 0; i < serializedProperty.arraySize; i++) { SerializedProperty serializedProperty2 = serializedProperty.GetArrayElementAtIndex(i).FindPropertyRelative(AvatarMaskUtility.sBoneName); ArrayUtility.Add <string>(ref humanTransforms, serializedProperty2.stringValue); } return(AvatarMaskUtility.TokeniseHumanTransformsPath(refTransformsPath, humanTransforms)); }
public static string[] GetAvatarHumanTransform(SerializedObject so, string[] refTransformsPath) { SerializedProperty property = so.FindProperty(AvatarMaskUtility.sHuman); if (property == null || !property.isArray) { return((string[])null); } string[] array = new string[0]; for (int index = 0; index < property.arraySize; ++index) { SerializedProperty propertyRelative = property.GetArrayElementAtIndex(index).FindPropertyRelative(AvatarMaskUtility.sBoneName); ArrayUtility.Add <string>(ref array, propertyRelative.stringValue); } return(AvatarMaskUtility.TokeniseHumanTransformsPath(refTransformsPath, array)); }
public static string[] GetAvatarHumanTransform(SerializedObject so, string[] refTransformsPath) { SerializedProperty serializedProperty = so.FindProperty(AvatarMaskUtility.sHuman); string[] result; if (serializedProperty == null || !serializedProperty.isArray) { result = null; } else { List <string> list = new List <string>(); for (int i = 0; i < serializedProperty.arraySize; i++) { SerializedProperty serializedProperty2 = serializedProperty.GetArrayElementAtIndex(i).FindPropertyRelative(AvatarMaskUtility.sBoneName); list.Add(serializedProperty2.stringValue); } result = AvatarMaskUtility.TokeniseHumanTransformsPath(refTransformsPath, list.ToArray()); } return(result); }