protected void Start() { // Finding DataManager dataManager = GameObject.Find("DataManager").GetComponent <DataManager>(); // Loading references to external transforms canvas = GameObject.Find("Canvas").transform; table = GameObject.Find("TableContent").transform; page = GameObject.Find("PageContent").transform; // Loading BuildCanvas buildCanvas = canvas.GetComponent <BuildCanvas>(); // Generating pageBounds RectTransform pageView = (RectTransform)GameObject.Find("Page").transform; pageBounds = new Bounds(pageView.localPosition, pageView.rect.size); selected = false; previous_parent = null; previous_index = 0; }
// Use this for initialization void Start() { buildCanvas = GameObject.Find("Canvas").GetComponent <BuildCanvas> (); gameObject.GetComponent <Button> ().onClick.AddListener(Simulate); }