Closed JmgrArt closed 6 years ago
Hi @JmgrArt, I'm glad you're enjoying the project! Sorry to hear about the issue you're having. I wonder what's adding \r\n characters to the bindings files on Windows. Those files aren't meant by be hand-edited in projects using UnityNativeScripting, so they should always have just the \n line endings that they're posted to GitHub with. Do you know how those files got \r\n line endings? In any case, I'll make a note to improve the robustness of the code generator by handling \r\n line endings in case this (somehow) happens again in the future. For now, you can work around the issue by converting the line endings (e.g. with dos2unix
) back to their original \n form.
I think I know what happened: I pasted some code containing \r\n in the bindings file within my IDE (Qt Creator), and I suppose that it converted all newline to the native characters under Windows: \r\n. Anyway, as you suggested I fixed the issue by editing the file with Notepad++ and converting all newline characters to \n. Thanks. PS: I needed to edit the bindings file to add an include directive at the top.
Hi. Thanks for this amazing project!
I may have noticed an issue in the bindings generator under Windows: it tries to inject code between markers using \n as newline character. Alas, under Windows since the newline characters are \r\n the generator fails finding the beginning marker and silently skips the injection.
This issue prevents adding new types to be generated.