public AnchorPoint GetAnchorPoint(string name) { if (!anchor_points.ContainsKey(name)) //If we don't have this anchor point { PrintDebug(this, 2, "Creating new Anchor Point Object: " + name); GameObject anchorobject = new GameObject(name); anchorobject.transform.parent = gameObject.transform; AnchorPoint anchorpoint = anchorobject.AddComponent <AnchorPoint>(); anchorpoint.MoveAnchorPixel(0, 0); anchor_points.Add(name, anchorpoint); } return(anchor_points[name]); }