jacksondunstan / UnityNativeScripting

Unity Scripting in C++

Home Page:https://jacksondunstan.com/articles/3938

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binding build error

lcals opened this issue · comments

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.