Search Unity

TextAsset

Discussion in 'Editor & General Support' started by podperson, Nov 30, 2007.

  1. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    A little more documentation would be helpful (it's not even mentioned in the reference section Table of Contents).

    If I flag a TextAsset as user modifiable ... what does that do?

    If I change the text property of a TextAsset, under what, if any, conditions does its property change? E.g. can I use TextAssets to save games?
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Basically the contents of any text, html or xml file in the project can be accessed via TextAsset. It's like including a read-only file for whatever reasons you want (mostly because you need large amounts of text data). You can't change the text of it, and it's not a separate file that a game could be saved to.
     
  3. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
  4. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    No I didn't see that page, but it doesn't answer my questions...

    On the plus side, my time spent writing text i/o routines has not been wasted :)

    Also on the plus side (and I guess this is the point), if I want to specify internal game data using text files, I assume it will now get automagically bundled into the final app / plugin file.