jacksondunstan / UnityNativeScripting

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

Some fixes #65

Closed Kaladrius2trip closed 3 years ago

Kaladrius2trip commented 3 years ago

For searching tags by IndexOf in existing binding files now uses Environment.NewLine. Because in Windows default newline symbols it's "\r\n" instead "\n". Maybe should use RegEx for this.

And all library build with prefix "lib" so... I have no idea how to fix it. I use CMake command to replace this by empty string.

jacksondunstan commented 3 years ago

@Kaladrius2trip Thanks for submitting this PR! I like the newline change and the updates to some of the Unity packages. May I ask why the "lib" prefix should be stripped off of build file names?

Kaladrius2trip commented 3 years ago

@jacksondunstan I use MinGW compiler. And library have this prefix on windows platform, but in const you are set lib name without prefix. I added condition for this in CMakeList.

And i changed all "\n" to Environment.NewLine When use StringBuilder.AppendLine it commonly use NewLine from Environment. With that might have some issue. But i cheked example and generated code looks like same.

jacksondunstan commented 3 years ago

@Kaladrius2trip Thanks for explaining the "lib" prefix and for changing it to only be stripped for MinGW. Thanks also for the the change to output environment-specific newlines. I went ahead and merged your changes.