//----------------------------------------------- private void oeSave() { oeObjClass[] oeObjArray = new oeObjClass[goObj.Length]; int index = 0; foreach (var go in goObj) { //Debug.Log(index + " " + go.transform.position); oeObjArray[index] = new oeObjClass(go, index); index++; } oeObjWrapper wrapperSave = new oeObjWrapper(); wrapperSave.oeObjects = oeObjArray; string json = JsonUtility.ToJson(wrapperSave); ///Debug.Log(data16File); System.IO.File.WriteAllText(data17File, json); }
private void oeSave() { if (!goDuplicatesCheck()) { return; } oeObjClass[] oeObjArray = new oeObjClass[goObj.Length]; int index = 0; foreach (var go in goObj) { oeObjArray[index] = new oeObjClass(go); index++; } oeObjWrapper wrapperSave = new oeObjWrapper(); wrapperSave.oeObjects = oeObjArray; string json = JsonUtility.ToJson(wrapperSave); System.IO.File.WriteAllText(data17File, json); }