protected EntityHistory ConvertEntityHistory(VrXmlHistoryData xmlHistory) { GameObject ownerObject = string.IsNullOrEmpty(xmlHistory.entityId) ? gameObject : entityObjects[xmlHistory.entityId]; EntityHistory history = ownerObject.AddComponent <EntityHistory>(); history.historyFileName = xmlHistory.fileName; history.sourceUpAxisIsZ = xmlHistory.upAxisIsZ; return(history); }
protected VrXmlHistoryData ConvertObjectHistory(EntityHistory history) { VrXmlHistoryData xmlHistory = new VrXmlHistoryData(); xmlHistory.entityId = history.GetComponent <EntityData>().id; xmlHistory.fileName = history.historyFileName; xmlHistory.upAxisIsZ = history.sourceUpAxisIsZ; return(xmlHistory); }