public bool onSelectedFurniture(ViewController sender, FurnitureEntry selectedEntry) { Furniture furniture = Catalog.getCatalog().createFurniture(selectedEntry.id, new Vector3(0, 0, 0), 0).GetComponent <Furniture> (); tempcSt.Execute(new SwapFurnitureCommand( focusedObject.gameObject, furniture.gameObject, controller.GetComponentInChildren <Room> ())); this.gameObject.GetComponentInChildren <Room> ().swapFurniture(focusedObject.GetComponent <Furniture> (), furniture); focusedObject = furniture.gameObject.transform; furniture.gameObject.name = focusedObjectName; return(false); }