public System.Collections.IEnumerator GetPersistedStateAsync(System.Action <PersistedState> process) { PersistedState state = new PersistedState(); state.version = PersistedState.CurrentVersion; state.cellString = null; Debug.Assert(terrainV2 != null, "terrainV2 was null?"); yield return(terrainV2.SerializeAsync(bytes => state.v2Data = ToBase64(bytes))); state.metadata = GetMetadata(); process(state); }