jacksondunstan / UnityNativeScripting

Unity Scripting in C++
https://jacksondunstan.com/articles/3938
MIT License
1.34k stars 135 forks source link

Binding build error #62

Closed lcals closed 4 years ago

lcals commented 4 years ago
  cppSourceContents = InjectIntoString(
            cppSourceContents,
            "/*BEGIN FUNCTION POINTERS*/\n",
            "\n\t/*END FUNCTION POINTERS*/",
            builders.CppFunctionPointers.ToString());

static string InjectIntoString(
        string contents,
        string beginMarker,
        string endMarker,
        string text)
    {
     int beginIndex = contents.IndexOf(beginMarker, startIndex);
            if (beginIndex < 0)
            {
                return contents;
            }
    }

error: Unable to split string correctly

WINDOWS \r\n(0x0d, 0x0a) MAC \r(0x0d) UNIX \n(0x0a).

jacksondunstan commented 4 years ago

It's important to not change the line endings of the generated files for this reason. You can fix the issue by converting the line endings back.