private void BackUpCurrentData() { if (cublets.Length == 0 || cublets[0] == null) { return; } var dataList = new CubletData[cublets.Length]; for (int i = 0; i < cublets.Length; i++) { dataList[i] = cublets[i].BackUpData(); } //TODO: Pass array to SO }
public void SetTransformFromData(CubletData savedData) { originalPosition = savedData.OriginalLocalPosition; transform.localPosition = savedData.MostRecentLocalPosition; transform.localRotation = savedData.MostRecentWorldRotation; }