public void ReplaceInit <T>(T init, TraitInfo info) where T : ActorInit { var original = GetInitOrDefault <T>(info); if (original != null) { reference.Remove(original); } reference.Add(init); GeneratePreviews(); }