public static StateSyncMessage Create(RoomState roomState) { var obj = HoloNetAppModule.instance.objectPool.Pop <StateSyncMessage>(); obj.roomState = roomState; return(obj); }
private RoomState PackAllStates() { var result = new RoomState(); var objects = HoloNetAppModule.instance.objectsManager.GetAll(); result.objectStates = new List <HoloNetObjectState>(); foreach (var item in objects) { result.objectStates.Add(item.GetState()); } result.creationTime = HoloNetAppModule.instance.provider.GetServerTime(); return(result); }
private void OnStateReceived(StateSyncMessage message) { Debug.Log("[HOLONET] - Received Object State Snapshot."); roomStateToApply = message.roomState; }
public void ClearRoomState() { roomStateToApply = null; }