jacksondunstan/UnityNativeScripting

Binding build error

lcals opened this issue · 1 comments

lcals commented
  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).

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.