Noticed we only supports Unity 2019.4 or later, and at this version it supports NETFX4.7 or netstandard2.1 IIRC. At this time .NET added UnmanagedTypes.LPUTF8Str to marshal string and StringBuilder, with bidirectional marshal support. We can delete custom complex string marshalling code, and have a robust string marshal handling.
To achieve this, we can simply reference the older codegen, with changing UnmanagedTypes.LPSTR to UnmanagedTypes.LPUTF8Str . I think this will be done in several generator line changes.
Noticed we only supports Unity 2019.4 or later, and at this version it supports NETFX4.7 or netstandard2.1 IIRC. At this time .NET added
UnmanagedTypes.LPUTF8Strto marshalstringandStringBuilder, with bidirectional marshal support. We can delete custom complex string marshalling code, and have a robust string marshal handling.To achieve this, we can simply reference the older codegen, with changing
UnmanagedTypes.LPSTRtoUnmanagedTypes.LPUTF8Str. I think this will be done in several generator line changes.