Answers for "how to use json in unity"

C#
0

how to use json in unity

string json = JsonUtility.ToJson(myObject);
// json now contains: '{"level":1,"timeElapsed":47.5,"playerName":"Dr Charles Francis"}'
Posted by: Guest on March-07-2021
0

how to use json in unity

MyClass myObject = new MyClass();
myObject.level = 1;
myObject.timeElapsed = 47.5f;
myObject.playerName = "Dr Charles Francis";
Posted by: Guest on March-07-2021
0

how to use json in unity

myObject = JsonUtility.FromJson<MyClass>(json);
Posted by: Guest on March-07-2021

Code answers related to "how to use json in unity"

C# Answers by Framework

Browse Popular Code Answers by Language