- Home /
Question by
bbyford · May 22, 2016 at 11:07 PM ·
serializationjsonserializable
JsonUtility not found / working
Trying to import a json file and have as far been unable to stop JsonUtility from being red and there for being not found in the current context... any help would be appreciated!
using UnityEngine;
using System;
public class levelData : MonoBehaviour {
level level1 = new level();
// Use this for initialization
void Start () {
// asset = Resources.Load<TextAsset>("JsonTest");
}
public level load(){
return JsonUtility.FromJson<level>("something");
}
}
[System.Serializable]
public class level{
public int levelNum;
}
Comment
What version of Unity are you using? JsonUtility was added in version 5.3, look at "And much more" at the bottom: http://blogs.unity3d.com/2015/12/08/unity-5-3-all-new-features-and-more-platforms/
Your answer
Follow this Question
Related Questions
Firebase Datasnapshot Json to Object using JsonUtility 1 Answer
Saving Non-Prefab Data During Editor Play 0 Answers
Parsing "complex" json 1 Answer
Serialization errors.. 0 Answers
Can a GameObject be serialized? 1 Answer