public static void SetupPlayerBuildingButton() { var playerBuildingInfo = UIView.Find <UIPanel>("(Library) CityServiceWorldInfoPanel"); if (PBMenuPanel == null) { PBMenuPanel = (playerBuildingInfo.AddUIComponent(typeof(PlayerBuildingButton)) as PlayerBuildingButton); } PBMenuPanel.Show(); }
public static void SetupPlayerBuildingButton() { var playerBuildingInfo = UIView.Find <UIPanel>("(Library) CityServiceWorldInfoPanel"); if (PBButton == null) { PBButton = (playerBuildingInfo.AddUIComponent(typeof(PlayerBuildingButton)) as PlayerBuildingButton); } PBButton.width = 40f; PBButton.height = 35f; PBButton.relativePosition = new Vector3(120, playerBuildingInfo.size.y - PBButton.height); PBButton.Show(); }