Loading Text File from Resource

Hi All,

I want to read a text file using C# and parse it into a Hashtable.

I’m aware of Unity’s TextAsset and LoadResource but that’s not what I want to use here. LoadResource returns a binary stream and don’t think I can use that with the .net text read API.

Can I just put a text file in my Resources folder and read it?

Is the path

Application.dataPath + "/Resources/" + filename

Will everything I include in the resources directory get moved to the device on build?

Thanks.

Hello,

Yes you can put it in your resources.

About being moved when you compile it, I’m not sure.

but I’m sure this thread can help you out :slight_smile:
http://forum.unity3d.com/viewtopic.php?t=23318&highlight=read+file+iphone