Skip to content

Commit

Permalink
Marshal Strings as UTF8 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
unreliablecode authored Aug 16, 2023
1 parent f3533f9 commit 63dae0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Il2CppInterop.Runtime/IL2CPP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ public static extern bool il2cpp_class_is_subclass_of(IntPtr klass, IntPtr klass
public static extern IntPtr il2cpp_class_from_il2cpp_type(IntPtr type);

[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_class_from_name(IntPtr image, [MarshalAs(UnmanagedType.LPStr)] string namespaze,
[MarshalAs(UnmanagedType.LPStr)] string name);
public static extern IntPtr il2cpp_class_from_name(IntPtr image, [MarshalAs(UnmanagedType.LPUTF8Str)] string namespaze,
[MarshalAs(UnmanagedType.LPUTF8Str)] string name);

[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_class_from_system_type(IntPtr type);
Expand Down Expand Up @@ -503,7 +503,7 @@ public static extern IntPtr il2cpp_class_from_name(IntPtr image, [MarshalAs(Unma

[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_class_get_field_from_name(IntPtr klass,
[MarshalAs(UnmanagedType.LPStr)] string name);
[MarshalAs(UnmanagedType.LPUTF8Str)] string name);

[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_class_get_methods(IntPtr klass, ref IntPtr iter);
Expand Down

0 comments on commit 63dae0b

Please sign in to comment.