protected override void Initialize()
        {
            var sr = GetComponent <SpriteRenderer>();

            if (sr != null)
            {
                sizer = new SpriteSizer(this, sr);
            }
            else
            {
                sizer = new RectTransformSizer(this, GetComponent <RectTransform>(), Vector2.one);
            }
            _refLayouts = new [] { firstAnchor, secondAnchor };
        }
Beispiel #2
0
 protected override void Initialize()
 {
     _refLayouts = new [] { positionRef, sizeRef };
     sizer       = CreateSizer();
 }