protected override void LoadSnapshot(FinishedLoadingEvent e) { var all = FindObjectsOfType <GameObject>(); for (int i = 0; i < all.Length; i++) { var go = all[i]; if (!snapshot.Contains(go.GetId())) { go.Destroy(); } } }
protected override void LoadSnapshot(FinishedLoadingEvent e) { var all = gameObject.GetAllComponents(); for (int i = 0; i < all.Length; i++) { var comp = all[i]; if (!snapshot.Contains(comp.GetType().Name)) { comp.Destroy(); } } }
protected abstract void LoadSnapshot(FinishedLoadingEvent e);