Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections.Generic;
- public class Utils
- {
- public static string arrayToJson<T>(IList<T> array, char separate)
- {
- string response = string.Empty;
- for (int i = 0; i < array.Count; i++)
- {
- response += JsonUtility.ToJson(array[i]);
- if (i != array.Count - 1)
- response += separate;
- }
- return response;
- }
- }
- // example: https://www.youtube.com/watch?v=new5vnMsbwI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement