private void OnNetMessageReceived(NetMessageDestroyValue destroyMessage, INetworkInterfaceConnection arg2) { if (NetSerializer.IsValidType(destroyMessage.TypeId)) { Type type = NetSerializer.GetTypeFromId(destroyMessage.TypeId); var container = SyncedValues.GetContainer(type); if (container != null) { SyncedValues.DestroyContainer(container); } } }
private void OnNetMessageReceived(NetMessageSyncValue syncMessage, INetworkInterfaceConnection arg2) { if (syncMessage.ValueData == null) { return; } // get value type Type type = NetMessageInterpreter.GetMessageType(syncMessage.ValueData); // find synced obj SyncedValueContainer container = SyncedValues.GetOrCreateContainer(type); // set data container.SetRawData(syncMessage.ValueData); container.RaiseChangeEventIfNecessary(); }
public virtual void Dispose() { SyncedValues.s_DriverInstance = null; SyncedValues.DestroyAllValues(); }