public string ResolveNameConflict(UField field, string name) { UFunction function = field as UFunction; if (function != null) { // Functions are a special case and must use the base-most function for name resolving. // See above for more info on this. UFunction originalFunction; UClass originalOwner = codeGenerator.GetOriginalFunctionOwner(function, out originalFunction); if (originalOwner != Class) { StructInfo originalOwnerStructInfo = codeGenerator.GetStructInfo(originalOwner); return(originalOwnerStructInfo.ResolveNameConflict(originalFunction, name)); } } string resolvedName; if (conflictInfo.ResolvedName.TryGetValue(field, out resolvedName)) { return(resolvedName); } return(name); }
private string ResolveNameConflict(UField field, string name) { UStruct unrealStruct = field.GetOwnerStruct(); if ((field as UFunction) != null) { // GetOwnerStruct will return itself if it is a UStruct (which is true for UFunction) unrealStruct = field.GetOwnerClass(); } if (unrealStruct != null) { StructInfo structInfo = GetStructInfo(unrealStruct); if (structInfo != null) { return(structInfo.ResolveNameConflict(field, name)); } } return(name); }