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 Mat Brummitt · Jun 25, 2010 at 12:13 AM · iphonefoundnonegetdirectories

Unity iPhone - Directory.GetDirectories() - None Found?

Hi All,

Ok, so my app works fine in the Unity Editor but on the iPhone, Directory.GetDirectories() throws an exception because no directory exists. Within the Unity editor it works swimmingly, and all my folders are pulled out just fine, but not when compiled onto the iPhone.

The path i'm feeding in is the returned path of Application.dataPath plus my "Lessons" directory which i've added inside the Unity editor. However, when I look into the "Unity Player" directory after building, and I explore the .app package, I can see some of my other assets in here, but none of my additional directories and their files - they seem to have disappeared?

I've seen in MonoDevelop that you can tell individual files not to compile - is this something I need to do in order to keep my file structure intact to enable me to lookup directories and their files?

Any advice would be very much appreciated - it's been a day of plentiful hair pulling today ;)

Thanks guys

Mat

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
Best Answer

Answer by Eric5h5 · Jun 25, 2010 at 12:39 AM

When publishing a build, Unity only includes files that are directly accessed in the editor. The only exceptions are: 1) scripts, since trying to figure out which scripts are referenced is problematic, so all scripts are always included, and 2) everything in the Resources folder, if one exists. So if you want additional files, you'll have to include them manually.

Comment
Add comment · Show 1 · 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 Mat Brummitt · Jun 25, 2010 at 09:34 AM 0
Share

Ah, thanks for your help! For the benefit of anyone else, the manually added folders/files should be added inside of the "Unity Player / Data" directory once you've hit the build button.

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

No one has followed this question yet.

Related Questions

A node in a childnode? 1 Answer

Vector3 and power 1 Answer

EXTREMELY basic button question. 2 Answers

ExecutionEngineException: Unity 3 on the iPhone 2 Answers

iphone unity lights don't render in the phone 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