Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity json save array

public class MyArray {
	public T[] array;
}

var class = new MyArray();
var outputString = JsonUtility.ToJson(class);
File.WriteAllText("C:MyFile.json", outputString);

//In reverse, you can deserialize anything doing this:
var inputString = File.ReadAllText("C:MyFile.json");
var class = JsonUtility.FromJson<MyArray>(inputString);
Comment

PREVIOUS NEXT
Code Example
Csharp :: access a local varible in a different function C# 
Csharp :: c# datetimepicker set weeks after today 
Csharp :: how to change textMesh Pro unity 
Csharp :: repeat 10 timesw c# 
Csharp :: how to add a list to observablecollection in c# 
Csharp :: delayed function unity 
Csharp :: unity controls 3d 
Csharp :: start the terminal from c# 
Csharp :: rb.addforce c# 
Csharp :: c# get class name by type 
Csharp :: unity clamp rotation 
Csharp :: how to make an object invisible unity 
Csharp :: c# generate random number 
Csharp :: decimal to string c# 
Csharp :: how to deactivate objects through scripts in unity 
Csharp :: 2d game art 
Csharp :: shuffle arraylist c# 
Csharp :: c# split on multiple characters 
Csharp :: linq distinct count 
Csharp :: loop through string array c# 
Csharp :: c# remove special characters from string 
Csharp :: c# string to variable name 
Csharp :: c# multiply string 
Csharp :: create list c# 
Csharp :: c# day of week number 
Csharp :: get all child gameObject of gameObject C# 
Csharp :: get any random item in array c# 
Csharp :: replace index in string c# 
Csharp :: move files from one folder to another using c# 
Csharp :: c# update control from another thread 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =