Seems when i spawn it on top of the foundation it does not detect its there as in i have not bulding priv window. do i need to set it parent to the foundation its spawned on?
string blockid = npcData.Box[sign.net.ID.ToString()].BoxID;
var block = BaseNetworkable.serverEntities.Find(Convert.ToUInt32(blockid)) as BuildingBlock;
BuildingPrivlidge tc = (BuildingPrivlidge)GameManager.server.CreateEntity("assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab");
if (block == null) return;
tc.transform.position = block.transform.position;
tc.gameObject.SetActive(true);
tc.Spawn();
SpawnRefresh(tc);
tc.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
tc.SendNetworkUpdateImmediate();
Puts("Spawned the tc");