private void DeserializeCachedChildViewsModelIfNeeded() { if (_cachedChildViewsModel == null) { return; } if (_childViewsModel == null) { Debug.LogError("RealtimeViewModel asked to read cached child views model, but doesn't have a child views model to read into. This is a bug!"); return; } // Deserialize child views model ReadStream cachedChildViewsModelStream = new ReadStream(_cachedChildViewsModel); cachedChildViewsModelStream.DeserializeRootModel(_childViewsModel); _cachedChildViewsModel = null; // Deserialize child views model delta updates foreach (CachedDeltaUpdate cachedChildViewsModelDeltaUpdate in _cachedChildViewsModelDeltaUpdates) { cachedChildViewsModelStream = new ReadStream(cachedChildViewsModelDeltaUpdate.buffer); cachedChildViewsModelStream.DeserializeRootModelDeltaUpdates(_childViewsModel, true, cachedChildViewsModelDeltaUpdate.updateID); } _cachedChildViewsModelDeltaUpdates = null; }