static string FormatIl2CppGeneric(TypeSig type) { string result = ""; if (type.GetName().StartsWith("List")) { result = "Il2CppList<"; } else if (type.GetName().StartsWith("Dictionary")) { result = "Il2CppDictionary<"; } else { return("void*"); } List <string> args = new List <string>(); foreach (var arg in type.ToGenericInstSig().GenericArguments) { if (arg.IsGenericInstanceType) { args.Add(FormatIl2CppGeneric(arg)); } else { args.Add(Il2CppTypeToCppType(arg)); } } result += string.Join(", ", args.ToArray()); result += ">*"; return(result); }