Closed thesadru closed 1 week ago
That is indirectly on purpose, as this is how it's defined in Unity's own typetree structure. The only problem with it is that the string class in C++ and C# is closer to python's bytes class. As bytes are a bit annoying to use, it still maps to str.
There is a reliable way to get the encoded data though, which I also wrote into the updated readme.
str.encode("utf-8", "surrogateescape"))
I see. I assume the issue with encoding must've been on my side. Would it be possible to delete the line referencing a script
attribute in the readme?
Oh, thanks, I missed the .script
part.
I cannot get a bytes version of
m_Script
anymore and there doesn't seem to be a reliable way to encode the data back into bytes.