public ListGestureFiles getAllFileNamesOfGestures() { string allGestDownload = PlayerPrefs.GetString(allGesturesFileName); listGesture = JsonUtility.FromJson <ListGestureFiles>(allGestDownload); return(listGesture); }
private bool AddNewGestureFileName() { if (!thisGestureContents) { string allGestDownlod = PlayerPrefs.GetString(allGesturesFileName); if (allGestDownlod != "") { listGesture = JsonUtility.FromJson <ListGestureFiles>(allGestDownlod); } listGesture._allFileName.Add(savedGesture); string allGestUpload = JsonUtility.ToJson(listGesture); PlayerPrefs.SetString(allGesturesFileName, allGestUpload); PlayerPrefs.Save(); return(true); } else { return(false); } }
private void Awake() { loadData = new LoadData(); listGesture = loadData.getAllFileNamesOfGestures(); if (listGesture != null) { foreach (string s in listGesture._allFileName) { Debug.Log(s); } } dropdown.ClearOptions(); try { dropdown.AddOptions(listGesture._allFileName); } catch (NullReferenceException) { listGesture = new ListGestureFiles(); listGesture._allFileName.Add("No items!"); dropdown.AddOptions(listGesture._allFileName); } }
public LoadData() { string allGestDownload = PlayerPrefs.GetString(allGesturesFileName); listGesture = JsonUtility.FromJson <ListGestureFiles>(allGestDownload); }