public static GetUnitySubstanceMaterialKey ( string unityMaterialPath, string substanceName, int substanceIndex ) : int | ||
unityMaterialPath | string | |
substanceName | string | |
substanceIndex | int | |
Результат | int |
public static int GetMaterialKeyFromAttributeIndex(HEU_GenerateGeoCache geoCache, int attributeIndex, out string unityMaterialName, out string substanceName, out int substanceIndex) { unityMaterialName = null; substanceName = null; substanceIndex = -1; if (attributeIndex < geoCache._unityMaterialAttrName.Length && geoCache._unityMaterialAttrStringsMap.TryGetValue(geoCache._unityMaterialAttrName[attributeIndex], out unityMaterialName)) { if (geoCache._substanceMaterialAttrNameInfo.exists && geoCache._substanceMaterialAttrName.Length > 0) { geoCache._substanceMaterialAttrStringsMap.TryGetValue(geoCache._substanceMaterialAttrName[attributeIndex], out substanceName); } if (geoCache._substanceMaterialAttrIndexInfo.exists && string.IsNullOrEmpty(substanceName) && geoCache._substanceMaterialAttrIndex[attributeIndex] >= 0) { substanceIndex = geoCache._substanceMaterialAttrIndex[attributeIndex]; } return HEU_MaterialFactory.GetUnitySubstanceMaterialKey(unityMaterialName, substanceName, substanceIndex); } return HEU_Defines.HEU_INVALID_MATERIAL; }