Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Reading and Writing JSON Files (C#, LitJSON) - AwfulMedia

Discussion in 'Community Learning & Teaching' started by Austin-Gregory, Sep 2, 2015.

  1. Austin-Gregory

    Austin-Gregory

    Joined:
    Sep 19, 2013
    Posts:
    78
    Well, I've finally come out of hiding and started making videos again! If you know of my channel, great. If not, let me give you a quickie.

    I do my best to produce high quality instructional videos covering various topics from Wordpress, HTML, PHP, Javascript, and my favorite: Unity. I really quite enjoy it, I just needed a break. Time just flew by and before I knew it, I was gone for an entire year.

    Now that I'm back, I'm shifting my entire focus to Unity videos. I want to cover as many topics as possible so if you have any suggestions you're welcome to drop them here or on one of the JSON videos below.

    Reading JSON Data


    Saving/Writing JSON Data


    Thanks for checking out AwfulMedia! If you like what you see here, be sure to check out the channel and subscribe so you don't miss a tutorial!

     
    hms0589, Arduc, bibo0 and 1 other person like this.
  2. Jiraiyah

    Jiraiyah

    Joined:
    Mar 4, 2013
    Posts:
    175
    Nice to know you are back to the world of unity video tutorials Austin
     
  3. Austin-Gregory

    Austin-Gregory

    Joined:
    Sep 19, 2013
    Posts:
    78
    Thanks for the welcome back!
     
  4. Info-Gamer

    Info-Gamer

    Joined:
    Aug 28, 2015
    Posts:
    3
    Hey Austin,

    How would you make this work when your json file is in the wp-content folder of your wordpress site the Unity project you are doing it from is a webGL build on the same site?
     
  5. Shahab-Mirza

    Shahab-Mirza

    Joined:
    Aug 23, 2016
    Posts:
    8
    Android devices does not read JSON file, but Unity able to read it. Why? Even i had copy the JSON file first in persistent path but still not working in mobile. Is there any need of plugin for mobile ?
     
  6. jeremiahlangner

    jeremiahlangner

    Joined:
    Oct 30, 2016
    Posts:
    2
  7. Motts182

    Motts182

    Joined:
    Feb 27, 2017
    Posts:
    2
    http://answers.unity3d.com/questions/1171740/android-devices-does-not-read-json-file-but-unity.html

    Hi u need to Use a TextAsset Type of Text and take the Json Using Resources.Load (don't use the extension .json only the name of document)
    1. TextAsset file = Resources.Load("yourFileName") as TextAsset;
    2. string content = file.ToString ();
     
  8. Deathstriker28

    Deathstriker28

    Joined:
    May 21, 2015
    Posts:
    2
    Thanks for this great tutorial and your RPG tutorial :D. You made something that was hard to understand at first a breeze. Will be drinking one on you tonight :D. Can you maybe just give a short explanation on how I would go about to save and load my json files to a ftp server like byet or webhotst000 if it is at all possible....Maybe I am asking a stupid question and it cant be done from a pc platform.but been googling all day and all I could find that suited my needs was the www class,which btw only gives me errors.I am keen to learn more about this. Thanks again for your tutorials...I know it isn't easy juggling personal life and tutorial videos
     
  9. LiSongting

    LiSongting

    Joined:
    Apr 19, 2018
    Posts:
    1
    thanks,it really helpful