public void saveTreeData() { List <int> treeData = new List <int>(); for (int i = 0; i < nodes.Count; i++) { treeData.Add(nodes[i].status); } GameStorage.Save <List <int> >(treeData, Application.persistentDataPath + SaveKey.SKILLTREEDATA_KEY); if (current is SkillNode) { SkillNode currentSkillNode = (SkillNode)current; string companionSkillActionName = currentSkillNode.getActionName(); GameStorage.Save <string>(companionSkillActionName, Application.persistentDataPath + SaveKey.COMPANIONSKILLNAME_KEY); } treeData.Clear(); treeData = null; }