JSON read/write using the node editor?

I want to load data from large text sources, such as a book.
The closet method I found was TextAsset.getText:

But that doesn’t allow me to search or parse through the file, as far as I know.

Is this something I could do with code by using the Udon compiler tools?


p.s. I did experiment with using special characters in the text file and then using the string split method to separate the data, but it seems really clumsy. I would prefer something more elegant.

can use u# (GitHub - MerlinVR/UdonSharp: An experimental compiler for compiling C# to Udon assembly)
if you want to write c# style code.

That all said you should have access to unity’s json utility

1 Like

Unfortunately the JsonUtility class is not exposed to Udon

You’ll have to write your own parser (don’t, because you don’t have access to reflection either).