internal void AddUserObject(int id, ITrackable toAdd) { print("adding object " + id); trackers.Add(id, toAdd); (globalState.objects ?? (globalState.objects = new List <RoomObjectObj>())).Add(toAdd.ToRoomObject()); newRoomObjects.Add(toAdd.ToRoomObject()); }
public bool AddSceneObject(ITrackable tracker) { if (trackers.ContainsKey(tracker.id)) { return(false); } trackers.Add(tracker.id, tracker); (globalState.objects ?? (globalState.objects = new List <RoomObjectObj>())).Add(tracker.ToRoomObject()); newRoomObjects.Add(tracker.ToRoomObject()); return(true); }