Add support for LuaToken to the LuaCall unreal pipeline

This commit is contained in:
2025-02-05 16:08:34 -05:00
parent 07dbec4bef
commit 4023d19247
4 changed files with 59 additions and 13 deletions

View File

@@ -37,6 +37,11 @@ public:
write_string(std::string_view(utf8str.Get(), utf8str.Length()));
}
void write_fname(const FName &name) {
FTCHARToUTF8 utf8str(name.ToString());
write_string(std::string_view(utf8str.Get(), utf8str.Length()));
}
void write_string(const char *s) {
write_string(std::string_view(s));
}
@@ -53,5 +58,15 @@ public:
double z = read_double();
return FVector(x, y, z);
}
FString read_fstring() {
std::string_view s = read_string_view();
return FString(s.size(), (const UTF8CHAR *)s.data());
}
FName read_fname() {
std::string_view s = read_string_view();
return FName(s.size(), (const UTF8CHAR *)s.data(), FNAME_Add);
}
};