//first saving attempt
    public void SaveLevel()
    {
        for (int i = 0; i < levelParent.transform.childCount; i++)
        {
            GameObject mvrEntry = levelParent.transform.GetChild(i).gameObject;
            if (mvrEntry.name.Substring(5).Split('/')[0] != i.ToString())
            {
                Debug.LogWarning("Something wrong!");
            }

            CATHODE.Models.alien_mvr_entry thisEntry = Result.ModelsMVR.GetEntry(i);
            thisEntry.Transform = mvrEntry.transform.localToWorldMatrix;
            Result.ModelsMVR.SetEntry(i, thisEntry);
        }

        Result.ModelsMVR.Save();
    }
示例#2
0
 /* Data setters */
 public void SetEntry(int i, alien_mvr_entry content)
 {
     movers[i] = content;
 }