public IEnumerable <NetworkIdentity> Serialize(ISpawnPrefabs prefabs) { return(prefabs.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public) .SelectMany(f => Serialize(f, prefabs)).Distinct()); }
public static IEnumerable <NetworkIdentity> Serialize(this ISpawnPrefabs prefabs) { return(new SpawnPrefabsSerializer().Serialize(prefabs)); }