static void AddChidGameObjectData() { for (int i = 0; i < m_transList.Count; i++) { Renderer render = m_transList[i].GetComponent <Renderer>(); if (render != null) { string goName = CalcGoChildName(m_transList[i].name, m_transList[i]); goName = goName.Substring(goName.IndexOf("/") + 1); //string goName = selectionGameObjects[i].name; Vector3 position = m_transList[i].position; Vector3 rotation = m_transList[i].rotation.eulerAngles; Vector3 scale = m_transList[i].lossyScale; int lightmapIndex = render.lightmapIndex; Vector4 lightmapScaleOffset = render.lightmapScaleOffset; int realtimeLightmapIndex = render.realtimeLightmapIndex; Vector4 realtimeLightmapScaleOffset = render.realtimeLightmapScaleOffset; GameObjectData goData = new GameObjectData(); goData.m_name = goName; goData.m_position = position; goData.m_rotation = rotation; goData.m_scale = scale; goData.m_lightmapIndex = lightmapIndex; goData.m_lightmapScaleOffset = lightmapScaleOffset; goData.m_realtimeLightmapIndex = realtimeLightmapIndex; goData.m_realtimeLightmapScaleOffset = realtimeLightmapScaleOffset; goData.ToString(); sceneLightMapData.m_gameObjectList.Add(goData); } } }