Is it possible to generate new text assets from code?

I’m working on an editor tool to let myself create quests within a framework of classes I’ve already built. I’d like to save the final product in JSON, which in unity, means dumping it into a textasset. I already have a string containing the final class encoded in a JSON, but as far as I can tell textassets are read-only, so I can’t hand it a pre-existing asset and assign something new to asset.text. Is there any way to explicitly create a new file encoded with whatever I’ve been working on in my tool?

Text assets aren’t read only. generally you will just save the data to persistantdatapath. Then if you open the game, read in the file, use the data, save it back out.

Hmm that makes sense, thank you for the clarification. :slight_smile: