private void write_data(string filename, List <MuscleMotionEditor.TransformNode> transform_node_list, ulong mask) { var root = (target as MuscleMotionEditor).transform; root.position = Vector3.zero; var posture = new Posture(); var serialize = posture.beginSet(); foreach (var transform_node in transform_node_list) { posture.set(serialize, transform_node.transform_, transform_node.parts_, transform_node.parent_parts_, mask); } posture.endSet(serialize); string json = JsonUtility.ToJson(posture); var path = Application.streamingAssetsPath + "/" + filename + ".dat"; System.IO.File.WriteAllText(path, json); Debug.LogFormat("write {0} done.", path); }