Example #1
0
 void Start()
 {
     internalRect = transform.FindChild ("Internal").GetComponent<RectTransform>();
     externalRect = transform.FindChild ("External").GetComponent<RectTransform>();
     internalButtons = internalRect.GetComponent<ButtonOrganizer> ();
     externalButtons = externalRect.GetComponent<ButtonOrganizer> ();
     attachmentPanel = PrefabLoader.GetGUIObject ("AttachmentPanel");
     userInput = transform.root.GetComponent<ShipEditorUserInput> ();
 }
Example #2
0
 public override void Initialize()
 {
     Canvas canvas = transform.FindChild ("ShipEditorCanvas").GetComponent<Canvas>();
     userinput = GetComponent<ShipEditorUserInput> ();
     foreach(GameObject g in GameObject.FindGameObjectsWithTag("Canvas")){
         g.SetActive(false); //set all other canvases inactive to be sure there aren't multiple active
     }
     canvas.gameObject.SetActive (true); //activate the canvas we want
     buttonorganizer = canvas.GetComponentInChildren<ButtonOrganizer> ();
     attachmentPanel = (GameObject)Resources.Load ("Prefabs/UI/AttachmentPanel");
     shipPanel = (GameObject)Resources.Load ("Prefabs/UI/ShipPanel");
     framePanel = (GameObject)Resources.Load ("Prefabs/UI/FramePanel");
 }