Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Mackenzie_the_Padawan · Nov 22, 2014 at 09:16 PM · beginnermonodevelop

how do I save a script when access is denied?

So part way through a tutorial for the beginner project "Roll-a-ball" and I'm trying to save the script it just had me write, and I'm being told access is denied. I have full permissions for everything. However, when I look at the properties for the fold of my project, it is marked "read-only". Even when I check this off it comes back on, not sure if that is my problem or not because it won't stay off. Any advice or assistance would be greatly appreciated.

Also, it tells me to check console log for more information, I can't seem to find that.

Here is the text for the error:

System.UnauthorizedAccessException: Access to the path 'C:\Users\alex\Desktop\Project 1(ball game)\Assets\Scripts.#PlayerController.cs' is denied.

 at

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

 at System.IO.FileStream.Init(String

path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

 at

System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)

 at

Mono.TextEditor.Utils.TextFileUtility.WriteText(String fileName, String text, Encoding encoding, Boolean hadBom) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\Mono.Texteditor\Mono.TextEditor.Utils\TextFileUtility.cs:line 184

 at

MonoDevelop.SourceEditor.SourceEditorView.Save(String fileName, Encoding encoding) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 672

 at

MonoDevelop.SourceEditor.SourceEditorView.Save(String fileName) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 588

 at

MonoDevelop.Ide.Gui.Workbench.OnWindowClosing(Object sender, WorkbenchWindowEventArgs args) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 719

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image richyrich · Nov 23, 2014 at 01:00 AM 0
Share

The immediate advice would be to just select all and paste into Notepad/other text editor. Presumably you've already tried right clicking on the folders and un-ticking the read-only option

When creating anything new with Unity, immediately after creating the project and a scene, save it all.

Log files are located...

http://docs.unity3d.com/$$anonymous$$anual/LogFiles.html

In some cases, it might not be Unity which is the cause; see also:

http://answers.unity3d.com/questions/599325/giving-me-a-systemunauthorizedaccessexception-ever.html

avatar image Mackenzie_the_Padawan · Nov 23, 2014 at 05:15 AM 0
Share

Ok, after deactivating my virus protection and removing the requirement for permissions I am still having a problem saving my script. In Unity it is saying "internal compiler error" but still in mono it is saying that it doesn't have access. I have even ran both in ad$$anonymous$$istration mode and still not helping.

avatar image Mackenzie_the_Padawan · Nov 29, 2014 at 02:25 AM 0
Share

I am still running into this same problem after multiple solution look ups. none have worked. someone please help. Not sure if this will help but in monodevelop when I try to save this is the error it gives.

 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\$$anonymous$$ackenzie\Desktop\Space Shooter\Assets\Scripts\.#PlayerController.cs' is denied.
 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 
    at System.IO.FileStream.Init(String path, File$$anonymous$$ode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
 
    at System.IO.FileStream..ctor(String path, File$$anonymous$$ode mode, FileAccess access, FileShare share)
 
    at $$anonymous$$ono.TextEditor.Utils.TextFileUtility.WriteText(String fileName, String text, Encoding encoding, Boolean hadBom)
 
    at $$anonymous$$onoDevelop.SourceEditor.SourceEditorView.Save(String fileName, Encoding encoding)
 
    at $$anonymous$$onoDevelop.SourceEditor.SourceEditorView.Save(String fileName)
 
    at $$anonymous$$onoDevelop.Ide.Gui.Document.Save()
 
    at $$anonymous$$onoDevelop.Ide.Gui.ViewCommandHandlers.OnSaveFile()
 
    --- End of inner exception stack trace ---
 
    at System.Runtime$$anonymous$$ethodHandle.Invoke$$anonymous$$ethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 
    at System.Reflection.Runtime$$anonymous$$ethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
 
    at System.Reflection.Runtime$$anonymous$$ethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 
    at System.Reflection.$$anonymous$$ethodBase.Invoke(Object obj, Object[] parameters)
 
    at $$anonymous$$onoDevelop.Components.Commands.CommandHandlerInfo.Run(Object cmdTarget, Command cmd)
 
    at $$anonymous$$onoDevelop.Components.Commands.Command$$anonymous$$anager.<>c__DisplayClassb.<DispatchCommand>b__2()
 
    at $$anonymous$$onoDevelop.Components.Commands.Command$$anonymous$$anager.DispatchCommand(Object commandId, Object dataItem, Object initialTarget, CommandSource source)

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Error trying to open script with Monodevelop 3 Answers

How do I get set up with a programming language and everything. 2 Answers

Help With "Scripting" 1 Answer

How to get step sound using axis.x movement 2 Answers

Cant get Monodevolop to work 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges