C# string delimiter

Hello,

if you have a string with a path in native C# you would write something like “X:\SomePath\”. After running this on Linux Mono this would bring up some errors. So the solution in a native application would be to use the variable for the system delimiter (Path.DirectorySeparatorChar).

However my question is: Is it necessary in Unity3D C# Scripting to use the delimiter or will the Unity3D compiler automatically remove invalid paths like the above for Mono under Linux based on the build target?

Thanks.

In the Unity Scripting API I found

All asset names & paths in Unity use forward slashes, paths using backslashes will not work.

Documentation