Search Issue Tracker
By Design
Votes
0
Found in
2018.2.3f1
Issue ID
1071671
Regression
No
[Windows][.NET 4.6] System.IO.GetDirectoryName converts forward slashes to backslashes
Using the example shader Lit/Diffuse With Shadows produces shadow errors outside of Shadow distance range
To reproduce:
1. Download attached project "Net46SystemIOBugs.zip" and open in Unity
2. Open "SystemIOBugs" scene
3. Set Scripting Runtime Version to ".NET 4.6 or .NET 4.x"
4. Enter Play mode
Expected results: Console logs the forward slash string and it is not modified by System.IO.GetDirectoryName
Actual results: Console logs the backslash string and it is modified by System.IO.GetDirectoryName
Notes:
- This issue appears only on Windows
- This issue does not reproduce on OSX
- On .NET 3.5 everything works as expected
Reproduced on Unity 2017.1.5f1, 2017.2.3p3, 2017.3.2f1, 2017.4.9f1, 2018.1.9f1, 2018.2.5f1 and 2018.3.0a9
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Resolution Note:
Although the behavior is different than that of .net 3.5, the .net 4.6 behavior matches that of the .NET Framework, so we consider this to be correct behavior.