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
1
Question by Bgriley2 · Jan 16, 2013 at 02:34 AM · filetextfieldlocalaccessing

Accessing Local Computer Files

What I would like to do is access the computer files after saying something in the textfield. This will be used as a fun widget for me to play around with, just an example. I would prefer javascript, but if you have to C#. I looked at a couple of Unity Answers about this, but haven't really understood much of it xD, so I decided to put it all in my own words. Just a textfield, when you type in something like, "/move Minecraft Desktop" it moves the file "Minecraft" to your Desktop. Thanks!

Comment
Add comment · Show 1
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 LijuDeveloper · Jan 06, 2015 at 07:04 AM 0
Share

Here is free file browser using c# code C# File Browser in asset store or C# File Browser in mega.co.nz

This File Browser is easy to use. In my game this file browser with few modification is using for image uploader .

For Android

File -> Build Settings ->Player Settings

Inspector -> Other Settings -> Configuration -> Write Access ->External( sdcard)

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by gribbly · Jan 16, 2013 at 03:06 AM

You can do as an editor extension:

http://docs.unity3d.com/Documentation/ScriptReference/FileUtil.html

Otherwise Unity is sandboxed and can't really access the local filesystem (by design). You can do .txt file stuff here:

http://docs.unity3d.com/Documentation/ScriptReference/TextAsset.html

EDIT: Oops, Bunny83 is right, only the web player is sandboxed. OP have a look here:

http://msdn.microsoft.com/en-us/library/system.io.file.aspx

...there's some sample code near the bottom of the page you can try.

Comment
Add comment · Show 2 · Share
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 Bunny83 · Jan 16, 2013 at 11:38 PM 1
Share

Unity isn't sandboxed, only the webplayer and of course a flash build is. All other builds can access any file you like with the System.IO stuff.

On some platforms some special options are available.
For example on Android build you have to specify in the settings that you want access the filesystem. In this case the user is informed about that when installing your app.

Accessing files has actually nothing to do with Unity. It's just a plain .NET feature which you can use in Unity the same way as in other C# (or any other .NET language) application.

avatar image Bgriley2 · Jan 18, 2013 at 10:21 PM 0
Share

Thanks, Cameron!

avatar image
0

Answer by Blasfemmy · Jan 16, 2013 at 03:04 AM

For moving around files on your desktop, why not just write up a basic java applet?

Comment
Add comment · Share
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

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

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Accessing local system ( File Browser ) 2 Answers

How can I change my game type to a .unity3d file? 1 Answer

If statement PLZ HELP!!!! 2 Answers

WebGL on file:/// 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