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 filler03 · Apr 01, 2013 at 11:27 PM · textresources.loadtextasset

when loading a textasset from .txt file, the quotations disappear??

I have a plain text file in my resources folder, I use Resources.Load and cast it to a TextAsset, and for some reason all of the quotations marks in this document disappear. Any ideas on why that would be??

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 Bunny83 · Apr 01, 2013 at 11:33 PM 0
Share

We need some more info:

  • How do you read the TextAsset (code?)

  • How can you tell the qutation marks are gone? (code?)

  • What kind of quoration marks are you talking about (" or ')? (sample file?)

avatar image filler03 · Apr 01, 2013 at 11:55 PM 0
Share

ok, here is how I load the file. When I print it out I can see that the quotations are gone, they are double quotations. I will attach the file here.link text

fileContent = (TextAsset)Resources.Load("file.txt");

print (word.text); string content = fileContent.text;

genesis1.txt (4.3 kB)

1 Reply

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

Answer by Bunny83 · Apr 02, 2013 at 12:47 AM

Well, I'm not sure what characters you used in the file, but they aren't ASCII quotation marks. All plain text editors i have can't display them. normal quotation marks have an ASCII code of 34(dec) or 22(hex). Your characters are 93(hex) and 94(hex) (147 / 148 dec) which aren't part of plain ascii.

txt files usually only contain ascii characters. If you want to include other unicode characters you have to use a different encoding when you save the file. utf8 for example is the most common encoding.

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 filler03 · Apr 02, 2013 at 01:24 AM 0
Share

That makes sense thank you.

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

11 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

Related Questions

Not able to load binary file through Resources.Load 1 Answer

How do I create GameObject & add GUIText from script for iOS? 1 Answer

Reading in level data from a text file 1 Answer

Finding the height of a text asset. 1 Answer

Basic Question about TextAssets 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