1

i have a simple code that im trying to use to access saves in json. my folder structure is file structure

and the files are in the tim folder. my code is TextAsset o = Resources.Load<TextAsset> ("saves/tim/basics"); and o is null. i then tried moving basics.json out of the tim folder so it is just in the saves folder, and then changed the code to TextAsset o = Resources.Load<TextAsset> ("saves/basics");, and that worked returned a textAsset. is this something im doing wrong, or just a limitation of unity?

Tyler Silva
  • 411
  • 6
  • 14
  • Please put a screenshot of where you put the file in the subfolder and I will tell you what you did wrong – Programmer Oct 06 '17 at 13:38
  • Closed since this is a typo. The duplicate mentioned that this should the named "Resources" not "Resource". – Programmer Oct 06 '17 at 13:46
  • okay, the folder was named correctly, just the s got cut off of the snipping tool, but now i just tried again, and it worked. – Tyler Silva Oct 06 '17 at 13:53
  • Well, I wonder why you would upload a screenshot of cut-off folder when the names are the main reason I wanted to see it. Glad you got it working. I advice you to use `Resources.LoadAsync` instead. You can find it at the end of the answer from the duplicate. – Programmer Oct 06 '17 at 13:56

0 Answers0