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 mntng · Aug 06, 2013 at 01:41 PM · packagereadtextfile

Project text file not built for Macs

Hi all,

For my game, I have a script reading from a textfile to make decisions/do actions. This text file is located in my game folder. When I build the game to a Mac Application, the textfile is not built along with the rest of the game so that the application cannot run properly. I opened Contents via "Show Package Contents" and tried to paste the file into all of the associated folders in Contents. However, it still isn't being read. Does anyone have suggestions? I tried to attach the .txt to a GameObject, but then I realized that wasn't allowed in Unity...

Note: For the Windows version, the textfile isn't built either but I pasted it next to the executable (in the same folder) and that seemed to solve my problems.

Comment
Add comment · Show 2
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 robertbu · Aug 06, 2013 at 07:52 PM 0
Share

If you text file is static (i.e. you are not trying to update after your game ships), then put the text file into your Assets folder. It will be come a TextAsset and you can use the interface to access the contents.

avatar image mntng · Aug 06, 2013 at 08:46 PM 0
Share

$$anonymous$$oving it into my Assets folder worked! Thank you!

Is there a way for me to accept your comment as the answer?

1 Reply

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

Answer by Xtro · Aug 06, 2013 at 03:56 PM

In Mac, App icons are folders. Just right click on it an select "open container" or something. You will see the inner files and folders in it. Try to place your txt file somewhere in there. Possibly the MacOS subfolder.

Comment
Add comment · Show 8 · 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 mntng · Aug 06, 2013 at 06:12 PM 0
Share

I tried that and I think something froze the application so I Force Quit out of it. Now, Unity won't let me open the application. I deleted it, restarted my computer, and rebuilt it with a different name but still no luck :( It keeps quitting "unexpectedly" and when I try to reopen, the same problem cycles. Help?

avatar image Xtro · Aug 06, 2013 at 07:09 PM 0
Share

Which app icon did you try it on ? You should put the txt file into your compiled game icon. Not into the Unity's own app icon.

Did you break unity ?

avatar image Xtro · Aug 06, 2013 at 07:11 PM 0
Share

Unity Project and Compiled Game are different places and folders. Even if you break the compiled application(your own) Unity should be able to open the project since you didn't touch the project folder. Right ?

avatar image mntng · Aug 06, 2013 at 07:39 PM 0
Share

I think I may have broken Unity :/ I don't think it was because I attached the textfile though. It seems like it was because I Force Quit...

avatar image mntng · Aug 06, 2013 at 07:43 PM 0
Share

Unfortunately still broken, opens:

"The last time you opened Unity it unexpectedly quit,..." and then automatically switches to a window that says: "Unity quit unexpectedly. Click Reopen to open the application again."

When I click Reopen, it goes back to the "The last time you opened Unity it unexpectedly quit" :(

There's a lot in the Problem Details and System Configuration, but I have no idea what any of it means.

Show more comments

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

15 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 avatar image avatar image avatar image

Related Questions

(Solved)StreamWriter Write line 0 Answers

Using XML for a simple webplayer Highscore Table 1 Answer

Missing (sprite) errors appear after checking read/write box on a spritesheet........ 0 Answers

Help, Reading a Json file (getting error KeyNotFounfExeption) 1 Answer

Mac Build not working? 1 Answer


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