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 dasshawn · Feb 21, 2012 at 10:19 PM · networkwindowspathosxdirectory

Access Windows Shared Folder on Mac

I am trying to extend a Windows platform project to work on a Mac Platform. The preferred language is C#. The project accesses a shared network folder on a Windows machine. It pulls data files from the folder for use at run-time.

When running the project on the Windows platform, I can use the Directory.Exists() and other Directory/File related functions without a problem with the path "\\\\computername\\sharedfoldername\\". On the Mac platform, the function Directory.Exists() returns false. The path separators are changed to the OS appropriate version using "Path.DirectorySeparatorChar". As a test, if the files are stored locally on the Mac, the code in place is able to access the files. To me, it seems like the issue is either the syntax of the path given to the function or something not taken into account to allow this method in Unity on the Mac.

I have been trying to determine what is the proper syntax that a mac would use for this function when accessing a Windows shared folder on the local network. The folder does exists and the Mac can the folder in finder with the line "smb://computername/sharedfoldername/". I mounted the share folder successfully in Finder, but that had no effect on the issue. The Windows platform is Windows 7. The Mac OS is OSX 10.6.7.

The WWW class is used in many cases in our program for the actual downloading of user files, however what I need is a way for the user to browse for files and upload files. I need to supply them with a way to count files in a directory, move up and down directories, and see a list of the files in the directory. If there is no way to do this within reason, it will bring the project on the Mac to a halt.

Any solution at all would be fantastic. Although not my first choice, steps can be taken outside the Unity program if necessary to facilitate the functionality I need for the project.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dasshawn · Mar 08, 2012 at 04:43 PM

As far as I could determine, I HAVE to mount the Windows drive on the Mac. Then use the "Where" location (in the info pane for the mounted shared folder) for the shared folder that was mounted. Then I could access it like any other folder, just like the Windows version does. This may not be the best solution but it does work.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

EditorUtility.OpenFilePanel uses \ FileInfo.Name uses / 0 Answers

Opening file Library/FailedAssetImports.txt failed because permission for the file was denied 0 Answers

Why is Unity identifying my computer as both a Windows and a Mac? 1 Answer

How to write files to the streaming asset folder in Android at runtime 1 Answer

Creating a Directory in "My Documents" 2 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