Skip to content

Instantly share code, notes, and snippets.

@larryhou
Last active March 16, 2021 07:29
Show Gist options
  • Save larryhou/3969f3a5cbf5c6741f9c25a09ab5a4ed to your computer and use it in GitHub Desktop.
Save larryhou/3969f3a5cbf5c6741f9c25a09ab5a4ed to your computer and use it in GitHub Desktop.
#include <il2cpp-api.h>
Il2CppString* v1 = il2cpp::vm::String::New("new_native_string");
Il2CppString* v2 = il2cpp_string_new("hello");
String_t* s1 = (String_t*)v1;
String_t* s2 = (String_t*)v2;

printf("%s\n", il2cpp::utils::StringUtils::Utf16ToUtf8(&___srcPath0->___start_char_1).c_str());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment