Exemple #1
0
 protected override void Awake()
 {
     base.Awake();
     UiPool      = GetComponent <UiPool>();
     Positioning = new UiPoolPositioning(UiPool);
     UpdatePositions();
 }
        private void DrawBoundaries()
        {
            if (Positioning == null)
            {
                Positioning = new UiPoolPositioning(uiPool);
            }
            else
            {
                Positioning.Update();
            }
            DrawSquare();
            var positions = PoolPositionUtility.GetAllIndices();

            Gizmos.color = Color.green;
            foreach (var i in positions)
            {
                var center = Positioning.GetPositionFor(i);
                uiPool.GetPosition(i).transform.position = center;
                Gizmos.DrawCube(center, Positioning.Size);
            }
        }