title: JsonUtility how to break json into new line
body: <p>I been follow the tutorial from <a href="https://www.youtube.com/watch?v=zPhtjcNTMN8" rel="nofollow noreferrer">this</a> video.</p>
  
  <p>The tutorial source code can be found at <a href="https://github.com/xenfinity-software" rel="nofollow noreferrer">here</a>...</p>
  
  <p>I have a problem of my Json data all been stored in 1 single line,</p>
  
  <p><a href="https://i.stack.imgur.com/ZK6Dv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZK6Dv.png" alt="enter image description here"></a></p>
  
  <p>I want the data break into new line for single object data</p>
  
  <p><a href="https://i.stack.imgur.com/o955P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o955P.png" alt="enter image description here"></a></p>
  
  <p>Here the code for the Json tutorial</p>
  
  <p>Actor file</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using System;
  
  public class Actor : MonoBehaviour {
  
  public ActorData data = new ActorData();
  
  public string name = "Tile";
  
  string newline = "\n";
  
  public void StoreData()
  {
      data.name = name;
      data.pos = transform.position;
  }
  
  public void LoadData()
  {
      name = data.name;
      transform.position = data.pos;
  
  }
  
  public void ApplyData()
  {
      SaveData.AddActorData(data);
  }
  
  void OnEnable()
  {
      SaveData.OnLoaded += LoadData;
      SaveData.OnBeforeSave += StoreData;
      SaveData.OnBeforeSave += ApplyData;
  
  }
  
  void OnDisable()
  {
      SaveData.OnLoaded -= LoadData;
      SaveData.OnBeforeSave -= StoreData;
      SaveData.OnBeforeSave -= ApplyData;
  }
  
  }
  
  [Serializable]
   public class ActorData
   {
      public string name;
  public Vector2 pos;
   }
  </code></pre>
  
  <p>save data file</p>
  
  <pre><code> using UnityEngine;
   using System.Collections;
   using System.Xml.Serialization;
   using System.IO;
  
   public class SaveData
   {
  
  public static ActorContainer actorContainer = new ActorContainer();
  
  public delegate void SerializeAction();
  public static event SerializeAction OnLoaded;
  public static event SerializeAction OnBeforeSave;
  
  public static void Load(string path)
  {
      actorContainer = LoadActors(path);
  
      foreach (ActorData data in actorContainer.actors)
      {
          GameController.CreateActor(data, GameController.playerPath,
              data.pos, Quaternion.identity);
      }
  
      OnLoaded();
  
      ClearActorList();
  }
  
  public static void Save(string path, ActorContainer actors)
  {
      OnBeforeSave();
  
      //ClearSave(path);
      SaveActors(path, actors);
  
      ClearActorList();
  }
  
  public static void AddActorData(ActorData data)
  {
      actorContainer.actors.Add(data);
  }
  
  public static void ClearActorList()
  {
      actorContainer.actors.Clear();
  }
  
  private static ActorContainer LoadActors(string path)
  {
      string json = File.ReadAllText(path);
  
      return JsonUtility.FromJson&lt;ActorContainer&gt;(json);
  }
  
  private static void SaveActors(string path, ActorContainer actors)
  {
      string json = JsonUtility.ToJson(actors);
  
      StreamWriter sw = File.CreateText(path);
      sw.Close();
      File.WriteAllText(path, json);
   }
  }
  </code></pre>