UnauthorizedAccessException: Access to the path GeometryUtils.cs.hlsl is denied
I've been getting issues with Unity 2018 recently and get this error when I try to implement any kind of PBR shaders, Whether its the lightweight or the high-end pipelines I seem to get this repeatedly and I have no Idea why.
UnauthorizedAccessException: Access to the path "C:\Users\user\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.render-pipelines.core@1.1.10-preview\CoreRP\GeometryUtils.cs.hlsl" is denied.
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:320)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
Answer by andrew_2992 · Apr 20, 2019 at 07:38 PM
For anyone else who has this problem in the future, it seems that I was able to fix it by correcting the file permissions. They were initially read only as observed in the folder properties in Windows explorer, uncheck it and apply recursively.
Your answer
Follow this Question
Related Questions
My Unity doesn't complie C# 1 Answer
Cannot set VR devices because the platform passed isn't supported by Unity. 0 Answers
Cannot choose the windows target build 0 Answers
Tornado picks up players but not animals 1 Answer
System.Diagnostics.StackTrace not working for non-development builds. 0 Answers