diff --git a/Il2CppInspector.Common/Cpp/CppDeclarationGenerator.cs b/Il2CppInspector.Common/Cpp/CppDeclarationGenerator.cs index 4c7808de..c821af47 100644 --- a/Il2CppInspector.Common/Cpp/CppDeclarationGenerator.cs +++ b/Il2CppInspector.Common/Cpp/CppDeclarationGenerator.cs @@ -520,7 +520,8 @@ private void InitializeNaming() { TypeNamer = TypeNamespace.MakeNamer((ti) => { if (ti.IsArray) return TypeNamer.GetName(ti.ElementType) + "__Array"; - var name = ti.Name.ToCIdentifier(); + var name = ti.Namespace + (String.IsNullOrEmpty(ti.Namespace) ? "" : ".") + ti.Name; + name = name.ToCIdentifier(); name = Regex.Replace(name, "__+", "_"); // Work around a dumb IDA bug: enums can't be named the same as certain "built-in" types // like KeyCode, Position, ErrorType. This only applies to enums, not structs. diff --git a/Il2CppInspector.Common/Properties/Resources.resx b/Il2CppInspector.Common/Properties/Resources.resx index 9a123101..9789bf95 100644 --- a/Il2CppInspector.Common/Properties/Resources.resx +++ b/Il2CppInspector.Common/Properties/Resources.resx @@ -193,7 +193,7 @@ std::string il2cppi_to_string(Il2CppString* str) { } // Helper function to convert System.String to std::string -std::string il2cppi_to_string(app::String* str) { +std::string il2cppi_to_string(app::System_String* str) { return il2cppi_to_string(reinterpret_cast<Il2CppString*>(str)); } #endif @@ -224,7 +224,7 @@ void il2cppi_new_console(); std::string il2cppi_to_string(Il2CppString* str); // Helper function to convert System.String to std::string -std::string il2cppi_to_string(app::String* str); +std::string il2cppi_to_string(app::System_String* str); #endif // Helper function to check if a metadata usage pointer is initialized @@ -1363,4 +1363,4 @@ void Run(); </ItemGroup> </Project> - \ No newline at end of file +