private void destroySkeletonandID(long id) { // print ("removing " + id); if (bagOfBonesDictionary.ContainsKey(id)) { Transform skeleton = bagOfBonesDictionary[id][0].BoneGameObject.transform.parent; SceneEvents.SkeletonUserDestroy(skeleton, id); Destroy(skeleton.gameObject); bagOfBonesDictionary.Remove(id); } userIDs.Remove(id); }