private PartStateChange GetChangedProperty(PartData oldPart, PartData newPart) { if (oldPart == null || newPart == null) { Debug.LogError("Can not find property change (Part State NULL)"); return(null); } Debug.Log("modifiers: " + oldPart.Modifiers.Count); foreach (PartModifierData oldmodifier in oldPart.Modifiers) { PartModifierData newmodifer = newPart.GetModifierById(oldmodifier.Id); if (newmodifer != null) { if (newmodifer != oldmodifier) { return(new PartStateChange(newmodifer.Id, String.Empty, String.Empty)); } } Debug.Log("Modifier Deleted"); } Debug.Log("No Change In Modifiers Found"); return(null); }