Skip to content

Use UnmanagedTypes.LPUTF8Str instead of old Utf8StringHandle #780

Description

@Akarinnnnn

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions