Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 apobec3f · Jan 08, 2018 at 03:49 PM · buildruntimetextasset

Is it possible to update a TextAsset at run time in a build?

Hi, Unity community,

I am interested in knowing if it is possible or is there any work around to update the content of a TextAsset at runtime in a build, and then restart the scene to validate the new TextAsset?

I understand the TextAsset is being compiled into the build and there is no easy way of changing it, also TextAsset.text is read-only, is there any work around on this?

Thank you in advance!

For clarification: Currently I am creating a new object with a TextAsset attached to it. What I want to achieve is at the runtime of a build, I download a new TextAsset from the server, save it in persistent data path and then replace the original one with the newly updated one.

The problem is I think TextAsset is compiled into the scene at compile time and there is no easy why of using a "set" function in the object to set the TextAsset to the new one saved in persistent data path.

I am wondering if there is any method that can achieve "update TextAsset" feature?

Comment
Add comment · Show 3
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 Bonfire-Boy · Jan 08, 2018 at 04:56 PM 0
Share

Not quite clear to me what you're asking but if you just need to be able to edit/save/load some text, you could write it to a file in persistentData.

avatar image apobec3f Bonfire-Boy · Jan 08, 2018 at 05:08 PM 0
Share

Thanks for your reply. Currently I am creating a new object with a TextAsset attached to it. What I want to achieve is at the runtime of a build, I download a new TextAsset from the server, save it in persistent data path and then replace the original one with the newly updated one.

The problem is I think TextAsset is compiled into the scene at compile time and there is no easy why of using a "set" function in the object to set the TextAsset to the new one saved in persistent data path.

I am wondering if there is any method that can achieve "update TextAsset" feature?

Thank you in advance!

avatar image Bonfire-Boy apobec3f · Jan 08, 2018 at 05:35 PM 0
Share

Sorry, it's still not clear to me. I'm not sure what you mean by "attaching a TextAsset to an object". If you have some text that you need to be able to update permanently, then you can 1) copy it from the build to a simple text file on first launch 2) load from that text file on setting up the scene(s) that use it and 3) update that text file at runtime if required. Is there some reason that's not going to work?

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Distribute terrain in zones 3 Answers

Resources.Load doesn't work at runtime 0 Answers

My coroutine ends when i initialize a postprocessing setting 0 Answers

RI.Hid Is Driving Me Insane 1 Answer

Post Processing Profile not changing in build 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