Beispiel #1
0
        private void Start()
        {
            delyCreateCount_Once = delyCreateCount_Once == 0 ? 1 : delyCreateCount_Once;

            var points = LayoutUtil.CalcutePoints(layoutItem);

            if (delyCreate)
            {
                StartCoroutine(DelyCreateItems(points));
            }
            else
            {
                DreateItems(points);
            }
        }
Beispiel #2
0
        private void OnDrawGizmos()
        {
            if (layoutItem == null)
            {
                return;
            }

            if (layoutItem.bounds != null)
            {
                foreach (var bound in layoutItem.bounds)
                {
                    Gizmos.DrawWireCube(bound.center + transform.position, bound.size);
                }
            }

            if (layoutItem.count.x > 0 && layoutItem.count.y > 0 && layoutItem.count.z > 0)
            {
                var points = LayoutUtil.CalcutePoints(layoutItem);
                foreach (var item in points)
                {
                    Gizmos.DrawSphere(item + transform.position, gizmosSize);
                }
            }
        }