private void printAllObjectStats() { ARObjects = GameObject.FindGameObjectsWithTag("ARObject"); foreach (GameObject ARObject in ARObjects) { Debug.Log(string.Format(ARObject.ToString() + ":\n" + "Position:\n" + "x:{0:0.######}\n" + "y:{1:0.######}\n" + "z:{2:0.######}\n" + "Rotation:\n" + "xr:{3:0.######}\n" + "yr:{4:0.######}\n" + "zr:{5:0.######}\n" + "Scale\n" + "xs:{6:0.######}\n" + "ys:{7:0.######}\n" + "zs:{8:0.######}\n", ARObject.transform.position.x, ARObject.transform.position.y, ARObject.transform.position.z, ARObject.transform.rotation.x, ARObject.transform.rotation.y, ARObject.transform.rotation.z, ARObject.transform.localScale.x, ARObject.transform.localScale.y, ARObject.transform.localScale.z )); } }
private string createARObjectStatsDictionary() { Dictionary <string, string> result = new Dictionary <string, string> (); ARObjects = GameObject.FindGameObjectsWithTag("ARObject"); foreach (GameObject ARObject in ARObjects) { string ARObjName = ARObject.ToString().Split(' ') [0]; string objStats = MyDictionaryToJson(createObjectStatDictionary(ARObject)); result.Add(ARObjName, objStats); } return(MyDictionaryToJson(result)); }