// Use this for initialization
    private void Awake()
    {
        if (FixPosition.instance == null)
        {
            FixPosition.instance = this;
        }
        list_RealBlock = new List <GameObject>();
        Anchors        = new List <RectTransform>();
        var anchors = _anchorParent.GetComponentsInChildren <Fixed_Script>();

        foreach (var anchor in anchors)
        {
            Anchors.Add(anchor.GetComponent <RectTransform>());
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     fp   = GetComponent <FixPosition>();
     rect = GetComponent <RectTransform>();
 }