void Update() { if (!m_baking || m_TrsArr == null || m_TrsArr.Length == 0) { return; } double t = EditorApplication.timeSinceStartup; if (t - _lastCheckTime > ELAPSE) { _lastCheckTime = t; foreach (var xfdata in m_Trs) { if (xfdata.HasDiff()) { XformData tmpData = XformData.Create(xfdata.tr); xfdata.Apply(); Undo.RecordObject(xfdata.tr, "baking"); tmpData.Apply(xfdata.tr); xfdata.CopyFrom(); //update saved data } } } }
public void DoRevert() { if (!m_Tr) { Dbg.LogWarn("CutsceneController.DoRevert: a GO {0} cannot be found, hierarchy changed during cutscene?", m_Tr.name); return; } m_StartTrData.Apply(m_Tr); }